-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b24
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056887 | emb-9 | Unassigned | P3 | Resolved | Fixed | b24 |
JDK-8064167 | 8u45 | Attila Szegedi | P3 | Resolved | Fixed | b01 |
JDK-8055632 | 8u40 | Attila Szegedi | P3 | Resolved | Fixed | b04 |
JDK-8070404 | emb-8u47 | Attila Szegedi | P3 | Resolved | Fixed | team |
Pre jdk9 prints only "i" with the following code:
import javax.script.*;
public class Main {
public static void main(String[] args) throws Exception {
ScriptEngineManager m = new ScriptEngineManager();
ScriptEngine e = m.getEngineByName("nashorn");
e.put(ScriptEngine.FILENAME, "foo");
e.eval("for (var i in this) print(i)");
}
}
jdk9 nashorn tip prints "i" and "javax.script.filename". So "javax.script.filename" has become enumerable. We need to restore the old behavior.
import javax.script.*;
public class Main {
public static void main(String[] args) throws Exception {
ScriptEngineManager m = new ScriptEngineManager();
ScriptEngine e = m.getEngineByName("nashorn");
e.put(ScriptEngine.FILENAME, "foo");
e.eval("for (var i in this) print(i)");
}
}
jdk9 nashorn tip prints "i" and "javax.script.filename". So "javax.script.filename" has become enumerable. We need to restore the old behavior.
- backported by
-
JDK-8055632 javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
- Resolved
-
JDK-8056887 javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
- Resolved
-
JDK-8064167 javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
- Resolved
-
JDK-8070404 javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
- Resolved
- relates to
-
JDK-8049524 Global object initialization via javax.script API should be minimal
- Resolved