-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b51
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085595 | emb-9 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | team |
JDK-8087030 | 8u65 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b01 |
JDK-8072695 | 8u60 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b03 |
JDK-8138464 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8076944 | emb-8u60 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | team |
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptContext.html#getAttribute-java.lang.String-int-
http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptContext.html#removeAttribute-java.lang.String-int-
For attribute names which are undefined they behave differently for Nashorn:
new ScriptEngineManager()
.getEngineFactories()
.stream()
.map(ScriptEngineFactory::getScriptEngine)
.map((engine) -> {
System.err.println("engine = " + engine);
return engine.getContext();
})
.forEach(c -> {
System.err.println("context = " + c);
System.err.println("get returns = " + c.getAttribute("undefinedname", ScriptContext.ENGINE_SCOPE));
System.err.println("remove returns = " + c.removeAttribute("undefinedname", ScriptContext.ENGINE_SCOPE));
});
When run v.s. OracleJDK the output will be like:
engine = jdk.nashorn.api.scripting.NashornScriptEngine@f3eef9
context = javax.script.SimpleScriptContext@3c4f91
get returns = null
remove returns = undefined
The following JCK9 test fails due to this:
api/javax_script/ScriptContext/index.html#SetGetAttribute[remove_noValueDefined]
- backported by
-
JDK-8072695 NashornScriptEngine returns javax.script.ScriptContext instance with insonsistent get/remove methods behavior for undefined attributes
-
- Resolved
-
-
JDK-8076944 NashornScriptEngine returns javax.script.ScriptContext instance with insonsistent get/remove methods behavior for undefined attributes
-
- Resolved
-
-
JDK-8085595 NashornScriptEngine returns javax.script.ScriptContext instance with insonsistent get/remove methods behavior for undefined attributes
-
- Resolved
-
-
JDK-8087030 NashornScriptEngine returns javax.script.ScriptContext instance with insonsistent get/remove methods behavior for undefined attributes
-
- Resolved
-
-
JDK-8138464 NashornScriptEngine returns javax.script.ScriptContext instance with insonsistent get/remove methods behavior for undefined attributes
-
- Resolved
-