On Tue, 19 Dec 2023 12:47:53 GMT, Goetz Lindenmaier <go...@openjdk.org> wrote:

> …g exception
> 
> After leaving the method by throwing an exception the data can not be cleaned 
> any more.

src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 122:

> 120:                             ioe.addSuppressed(x);
> 121:                     }
> 122:                     if (ioe != null) {

I assume it's only important to zero the buffer when restoring the echo setting 
fails. If I read the changes correctly then it's been zero's even if readLine 
fails. It's okay, just probably unnecessary for that case.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17156#discussion_r1432381996

Reply via email to