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

jshell tool: only considers the first snippet of the external editor

    XMLWordPrintable

Details

    • b18
    • generic
    • generic
    • Verified

    Description

      ADDITIONAL SYSTEM INFORMATION :
      openjdk version "12-ea" 2019-03-19
      OpenJDK Runtime Environment 19.3 (build 12-ea+10)
      OpenJDK 64-Bit Server VM 19.3 (build 12-ea+10, mixed mode)


      A DESCRIPTION OF THE PROBLEM :
      After using an external editor, only the first snippet is taken into account by JShell. For demonstration purposes I used Notepad, but the same issue exists with Visual Studio Code.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      * run JShell and run the following 2 commands:
      /set editor notepad.exe
      /edit
      * in the Notepad window, enter 2 variable declarations:
      var i = 1;
      var j = 2;
      * save the file in Notepad and close the Notepad window
      * in JShell, list the variables:
      /vars

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      | int i = 1
      | int j = 2
      ACTUAL -
      | int i = 1

      CUSTOMER SUBMITTED WORKAROUND :
      Use the built-in default editor

      Attachments

        Activity

          People

            rfield Robert Field (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: