On Wed, 20 Dec 2023 08:07:38 GMT, Alan Bateman <al...@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. Yes, but this way it's assured we clean before we return. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17156#discussion_r1433984024