The spec http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getParameter-java.lang.String- says: "Returns null if no value is assigned to the key." and doesn't mention any IAEs. However the following line executed on Oracle's JDK. new ScriptEngineManager().getEngineFactories().forEach(f -> f.getParameter("no value assigned to this key")); will throw java.lang.IllegalArgumentException: Invalid key at jdk.nashorn.api.scripting.NashornScriptEngineFactory.getParameter(NashornScriptEngineFactory.java:123) which doesn't conform to the current spec and the corresponding JCK9(b05) test will fail on JDK9: api/javax_script/ScriptEngineFactory/index.html#GetParameter[noValue] The specification or the Nashorn implementation needs to be corrected.
|