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

jshell echoes the command with the results in the same line

XMLWordPrintable

    • generic
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      Artix Linux
      OpenJDK build 20-ea+22-1594
      Temurin build 19+36

      A DESCRIPTION OF THE PROBLEM :
      JShell appears to echo in an awkward manner non-elementary expressions that I pass through stdin. The same thing happens with every feedback mode. "/set format" does not seem to have any effect on this issue.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      jshell <<< '"test".toUpperCase()'
      jshell -q <<< '"test".toUpperCase()'
      jshell -s <<< '"test".toUpperCase()'
      jshell -v <<< '"test".toUpperCase()'

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Something like
          jshell> $1 ==> "TEST"
      or—if this echoing is intentional—
          jshell> "test".toUpperCase()
          jshell> $1 ==> "TEST"
      (and in that case an option to disable it).
      ACTUAL -
          jshell> "test".toUpperCase()$1 ==> "TEST"
      and similar outputs based on feedback mode.

      FREQUENCY : always


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

              Created:
              Updated: