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

jshell tool: /edit doesn't process each line as same as inputs for jshell

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9, 9-repo-kulla
    • tools
    • b147
    • generic
    • generic
    • Verified

      EditPad doesn't process inputs as same as inputs for jshell.

      System.out.println("Hello")
      System.out.println("World")

      This input for EditPad makes the error:
      | Error:
      | ';'がありません
      | System.out.println("hello")
      | ^

      It is very confusing and useless.
      Because when I open EditPad after running "System.out.println("Hello")" on jshell, the text in EditPad contains "System.out.println("Hello")" and it could be cause of error after several editing.
      (it is only happen when the invoked method returns void because JShell#cmdEdit don't put ";" to the end of statements.)

      And, above all, the user will be surprised at the input for EditPad because it is not processed like the input for jshell.

            rfield Robert Field (Inactive)
            shinyafox Shinya Yoshida
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: