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

jshell tool: crash on entering pseudo-commands: /<id> or /-<n>

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b13

      Description

      A confused user, seeing the /help output could (and has) entered the pseudo-commands (meant as descriptions), and since they are in the command list, it attempts to run them -- and crashes.

      jshell> /-<n>
      Exception in thread "main" java.lang.IllegalStateException
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool$Command.lambda$new$0(JShellTool.java:1287)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1234)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1160)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:929)
              at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:239)
              at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:119)
      /w/s/jdk10 1045>> ./build/linux-x86_64-normal-server-release/images/jdk/bin/jshell
      | Welcome to JShell -- Version 10-internal
      | For an introduction type: /help intro

      jshell> /<id>
      Exception in thread "main" java.lang.IllegalStateException
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool$Command.lambda$new$0(JShellTool.java:1287)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1234)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1160)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:929)
              at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:239)
              at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:119)

        Attachments

          Activity

            People

            • Assignee:
              rfield Robert Field
              Reporter:
              rfield Robert Field
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: