javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs
    • None
    • b24
    • generic
    • generic

        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.

              Assignee:
              Sundararajan Athijegannathan
              Reporter:
              Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: