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

JShell crashes when pressing up-arrow after issuing /-1 command

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10 64-bit
      Welcome to JShell -- Version 13.0.1

      A DESCRIPTION OF THE PROBLEM :
      Run JShell, enter simple input, e.g. 1, the input is executed. Then enter command /-1, the same input will be executed. Then press up-arrow, and JShell crashes with java.lang.IndexOutOfBoundsException. Tested on Windows, in a cmd.exe window.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      jshell<enter>
      1<enter>
      /-1<enter>
      <up-arrow>

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JShell does not exit.
      ACTUAL -
      JShell prints IndexOutOfBoundsException and exits.

      ---------- BEGIN SOURCE ----------
      1
      /-1
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Do not press up-arrow.

      FREQUENCY : always


            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: