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

jshell tool: crash on ctrl-up or ctrl-down

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b165
    • Verification:
      Verified

      Backports

        Description

        Found in Joni Gordon's draft comments on JShell reference doc: "Getting error with Ctrl-up: jshell> Exception in thread "main" java.lang.IllegalStateException: java.lang.No SuchMethodException: jdk.internal.jshell.tool.ConsoleIOContext$1.setBuffer(java. lang.String)"

        --- easily reproduced (I'm on Linux) ---

        jshell> Exception in thread "main" java.lang.IllegalStateException: java.lang.NoSuchMethodException: jdk.internal.jshell.tool.ConsoleIOContext$1.setBuffer(java.lang.String)
                at jdk.internal.le/jdk.internal.jline.extra.EditingHistory.moveHistoryToSnippet(EditingHistory.java:83)
                at jdk.internal.le/jdk.internal.jline.extra.EditingHistory.lambda$new$1(EditingHistory.java:58)
                at jdk.internal.le/jdk.internal.jline.console.ConsoleReader.readLine(ConsoleReader.java:2529)
                at jdk.internal.le/jdk.internal.jline.console.ConsoleReader.readLine(ConsoleReader.java:2278)
                at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:139)
                at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1120)
                at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:909)
                at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:239)
                at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:119)
        Caused by: java.lang.NoSuchMethodException: jdk.internal.jshell.tool.ConsoleIOContext$1.setBuffer(java.lang.String)
                at java.base/java.lang.Class.getDeclaredMethod(Class.java:2447)
                at jdk.internal.le/jdk.internal.jline.extra.EditingHistory.moveHistoryToSnippet(EditingHistory.java:77)
                ... 8 more

        (OS prompt)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jlahoda Jan Lahoda
                Reporter:
                rfield Robert Field
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: