-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b32
The spec
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getMethodCallSyntax-java.lang.String-java.lang.String-java.lang.String...-
says nothing about NPE of ScriptException throwing for nulls passed as obj or method name.
However at least for "obj - The name representing the object whose method is to be invoked." passing null doesn't make any sense since it is not possible to create a binding using null as a key.
Nashorn implementation allows null obj and method name and fails later on evaluation of the returned statement.
new ScriptEngineManager().getEngineFactories().forEach(f -> f.getMethodCallSyntax(null, "method"));
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getMethodCallSyntax-java.lang.String-java.lang.String-java.lang.String...-
says nothing about NPE of ScriptException throwing for nulls passed as obj or method name.
However at least for "obj - The name representing the object whose method is to be invoked." passing null doesn't make any sense since it is not possible to create a binding using null as a key.
Nashorn implementation allows null obj and method name and fails later on evaluation of the returned statement.
new ScriptEngineManager().getEngineFactories().forEach(f -> f.getMethodCallSyntax(null, "method"));
- csr for
-
JDK-8191201 javax.script.ScriptEngineFactory.getMethodCallSyntax() spec should not allow null be passed as an argument
- Closed
- relates to
-
JDK-8193134 api/javax_script/ScriptEngineFactory/index.html\#GetMethodCallSyntax Failure with NullPointerException
- Closed