RFR: 8320798: Console read line with zero out should zero out underlying buffer [v2]
Jaikiran Pai
jpai at openjdk.org
Thu Nov 30 11:01:07 UTC 2023
On Tue, 28 Nov 2023 19:30:34 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> It is best practice to zero out the underlying buffer after use.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>
> corrected fromIndex
src/java.base/share/classes/sun/nio/cs/StreamDecoder.java line 293:
> 291:
> 292: private void lockedFillZeroToPosition() throws IOException {
> 293: ensureOpen();
Hello Naoto, is this open check needed? Given that we are just zeroing out already read content, would it thus be OK to clear that content to zero even after this `Reader` instance has been closed?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16861#discussion_r1410504144
More information about the nio-dev
mailing list