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

Console.readPassword does not save/restore tty settings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 11
    • None
    • core-libs
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: