RFR: JDK-8194750, Console.readPassword does not save/restore tty settings

2018-04-13 Thread Xueming Shen
Hi, Please help review the change for JDK-8194750. issue: https://bugs.openjdk.java.net/browse/JDK-8194750 webrev: http://cr.openjdk.java.net/~sherman/8194750/webrev *fix has been manually verified. No new auto-regression test added. Thanks, Sherman

Re: RFR: JDK-8194750, Console.readPassword does not save/restore tty settings

2018-04-13 Thread Martin Buchholz
Emacs users thank you for working on this. To repro, try emacs -q, M-x shell and run your manual test in there. You'll see stty -a reports -echo. This is trickier than I expected, since you have to manage saving/restoring around each call to readPassword AND have an exit hook to restore in case

Re: RFR: JDK-8194750,Console.readPassword does not save/restore tty settings

2018-04-16 Thread Xueming Shen
On 4/13/18, 8:04 PM, Martin Buchholz wrote: This is trickier than I expected, since you have to manage saving/restoring around each call to readPassword AND have an exit hook to restore in case the user never gets around to responding to the prompt. I see in the old code echo returns a boolea

Re: RFR: JDK-8194750, Console.readPassword does not save/restore tty settings

2018-04-16 Thread Martin Buchholz
Thanks, this looks good. But I have my usual nitpicky comments 376 // sets the console echo on/off 377 private static native boolean echo(boolean on) throws IOException; I would document the return value. @returns the previous console echo on/off status 314 boolea

Re: RFR: JDK-8194750,Console.readPassword does not save/restore tty settings

2018-04-16 Thread Xueming Shen
Thanks! webrev has been updated accordingly as suggested. http://cr.openjdk.java.net/~sherman/8194750/webrev sherman On 4/16/18, 7:20 PM, Martin Buchholz wrote: Thanks, this looks good. But I have my usual nitpicky comments 376 // sets the console echo on/off 377 private static

Re: RFR: JDK-8194750, Console.readPassword does not save/restore tty settings

2018-04-16 Thread Martin Buchholz
Ship it!

Re: RFR: JDK-8194750,Console.readPassword does not save/restore tty settings

2018-04-17 Thread Alan Bateman
On 17/04/2018 06:15, Xueming Shen wrote: Thanks! webrev has been updated accordingly as suggested. http://cr.openjdk.java.net/~sherman/8194750/webrev Just catching on this one. The changes looks good, I'm just wondering if there is any way to create a reliable test for this. -Alan

Re: RFR: JDK-8194750,Console.readPassword does not save/restore tty settings

2018-04-17 Thread Xueming Shen
On 04/17/2018 12:13 AM, Alan Bateman wrote: On 17/04/2018 06:15, Xueming Shen wrote: Thanks! webrev has been updated accordingly as suggested. http://cr.openjdk.java.net/~sherman/8194750/webrev Just catching on this one. The changes looks good, I'm just wondering if there is any way to crea