-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e2591c
commit 570cd42
Showing
2 changed files
with
66 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Release 1.0.1 | ||
|
||
# API changes | ||
|
||
## `ConstructorStrategy` may return `null` to run `static` methods | ||
|
||
The `ConstructorStrategy` is now allowed to return a `null` instance. | ||
This indicates that a static method should be called in the | ||
`ExecutionStrategy`. | ||
|
||
The `DefaultExecutionStrategy` and `MethodExecutionStrategy` support this behaviour. | ||
|
||
Using a `NullConstructorStrategy` is the most convenient way to do this. | ||
|
||
|
||
# Bugfixes | ||
|
||
## `MethodExecutionStrategy.byMatchingArguments()` did not check `methodName` | ||
|
||
MethodExecutionStrategy.byMatchingArguments() is supposed to search for | ||
a method with the specified methodName, but the name was actually ignored. | ||
|
||
## Engine version | ||
|
||
The `JavaScriptEngineFactory.getEngineVersion()` of release 1.0.0 | ||
reported a wrong version "0.0.1". | ||
|
||
The new release reports the now correct version "1.0.1". | ||
|
||
|
||
# Enhancements | ||
|
||
## Improved error messages for ambiguous constructors and methods | ||
|
||
The error messages for ambiguous constructors and methods in the | ||
`ScriptException`s thrown by the `DefaultConstructorStrategy` | ||
and the `MethodExecutionStrategy` have been improved to list the | ||
ambiguous constructors and methods. | ||
|
||
``` console | ||
Ambiguous constructors with matching arguments found: | ||
public ch.obermuhlner.scriptengine.java.constructor.DefaultConstructorStrategyTest$TestConstructor(java.lang.String,java.lang.Long,int) | ||
public ch.obermuhlner.scriptengine.java.constructor.DefaultConstructorStrategyTest$TestConstructor(java.lang.String,java.lang.String,int) | ||
``` | ||
|
||
``` console | ||
Ambiguous methods 'doSomething' with matching arguments found: | ||
public java.lang.String ch.obermuhlner.scriptengine.java.execution.MethodExecutionStrategyTest$TestMethod.doSomething(java.lang.String,java.lang.Long,int) | ||
public java.lang.String ch.obermuhlner.scriptengine.java.execution.MethodExecutionStrategyTest$TestMethod.doSomething(java.lang.String,java.lang.String,int) | ||
``` | ||
|
||
## Javadoc | ||
|
||
Javadoc was written for all public classes. | ||
|
||
# Examples | ||
|
||
Note: The example code is available on github, but not part of the | ||
`java-scriptengine` library. | ||
|
||
All of the example code in this documentation is runnable | ||
in the class `ScriptEngineExample`. |