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

Console.readPassword does not save/restore tty settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      After calling "System.console().readPassword()", my tty echo setting is unconditionally turned on (sorry, I like "stty -echo").
      Of course, java should save and restore the tty settings (see e.g. stty -g)

      Linux demo:

       $ stty -echo
       $ echo ---; stty | grep echo; echo ---; jver 11 keytool -list -cacerts; echo ---; stty | grep echo; echo ---
      ---
      -echo
      ---
      Enter keystore password:
      [snip]
      ---
      ---

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sherman Xueming Shen
              Reporter:
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: