JDK-8144149 : Nashorn shebang argument handling fix broke no-argument case
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u60,9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2015-11-26
  • Updated: 2015-11-30
  • Resolved: 2015-11-27
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The fix for JDK-8143642 broke the case where a shebang expression has no arguments at all, and no arguments are passed:

#!/usr/local/bin/jjs
print(23)

Running this script without passing any arguments will break with an IndexOutOfBoundsException.
Comments
Duplicate of JDK-8143642.
27-11-2015