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

Nashorn shebang argument handling fix broke no-argument case

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u60, 9
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: