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

Console.readLine() drops '\' when reading through JLine

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • 25
    • 24, 25
    • tools
    • None

      Using a recent OpenJDK build, having:
      ---
      public class Test {
          public static void main(String... args) {
              System.err.println(System.console().readLine());
          }
      }
      ---
      and running it as:
      ---
      $ ./java /tmp/Test.java
      te\st
      test
      ---

      I.e. the `\` is dropped from the returned value.

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: