JDK-8050432 : javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-07-15
  • Updated: 2015-01-21
  • Resolved: 2014-07-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u40Fixed 9 b24Fixed
Related Reports
Relates :  
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.
This bug was reported by Avatar team.

This issue was caused by the fix for JDK-8049524