-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b48
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085588 | emb-9 | Attila Szegedi | P3 | Resolved | Fixed | team |
JDK-8087022 | 8u65 | Attila Szegedi | P3 | Resolved | Fixed | b01 |
JDK-8069347 | 8u60 | Attila Szegedi | P3 | Resolved | Fixed | b01 |
JDK-8138455 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8076936 | emb-8u60 | Attila Szegedi | P3 | Resolved | Fixed | team |
The spec for the methods
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngine.html#put-java.lang.String-java.lang.Object-
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngine.html#get-java.lang.String-
says:
"Throws:
NullPointerException - if key is null.
IllegalArgumentException - if key is empty."
However the following code executed on Oracle's JDK.
new ScriptEngineManager().getEngineFactories()
.stream()
.map(ScriptEngineFactory::getScriptEngine)
.forEach(e -> {
e.get("");
e.get(null);
e.put("", "a");
e.put(null, "a");
});
results in no exceptions thrown which doesn't conform to the current spec and the corresponding JCK9(b05) tests will fail on JDK9:
api/javax_script/ScriptEngineFactory/index.html#GetParameter[get_keyIsEmpty_IAE]
api/javax_script/ScriptEngineFactory/index.html#GetParameter[get_keyIsNull_NPE]
api/javax_script/ScriptEngineFactory/index.html#GetParameter[put_keyIsEmpty_IAE]
api/javax_script/ScriptEngineFactory/index.html#GetParameter[put_keyIsNull_NPE]
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngine.html#put-java.lang.String-java.lang.Object-
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngine.html#get-java.lang.String-
says:
"Throws:
NullPointerException - if key is null.
IllegalArgumentException - if key is empty."
However the following code executed on Oracle's JDK.
new ScriptEngineManager().getEngineFactories()
.stream()
.map(ScriptEngineFactory::getScriptEngine)
.forEach(e -> {
e.get("");
e.get(null);
e.put("", "a");
e.put(null, "a");
});
results in no exceptions thrown which doesn't conform to the current spec and the corresponding JCK9(b05) tests will fail on JDK9:
api/javax_script/ScriptEngineFactory/index.html#GetParameter[get_keyIsEmpty_IAE]
api/javax_script/ScriptEngineFactory/index.html#GetParameter[get_keyIsNull_NPE]
api/javax_script/ScriptEngineFactory/index.html#GetParameter[put_keyIsEmpty_IAE]
api/javax_script/ScriptEngineFactory/index.html#GetParameter[put_keyIsNull_NPE]
- backported by
-
JDK-8069347 NashornScriptEngine.put/get() impls don't conform to NPE, IAE spec assertions
-
- Resolved
-
-
JDK-8076936 NashornScriptEngine.put/get() impls don't conform to NPE, IAE spec assertions
-
- Resolved
-
-
JDK-8085588 NashornScriptEngine.put/get() impls don't conform to NPE, IAE spec assertions
-
- Resolved
-
-
JDK-8087022 NashornScriptEngine.put/get() impls don't conform to NPE, IAE spec assertions
-
- Resolved
-
-
JDK-8138455 NashornScriptEngine.put/get() impls don't conform to NPE, IAE spec assertions
-
- Resolved
-