Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8144149

Nashorn shebang argument handling fix broke no-argument case

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8u60, 9
    • core-libs
    • None

      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.

            mhaupt Michael Haupt
            mhaupt Michael Haupt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: