RFR: 8320798: Console read line with zero out should zero out underlying buffer [v2]

Naoto Sato naoto at openjdk.org
Thu Nov 30 17:39:33 UTC 2023


On Thu, 30 Nov 2023 10:58:13 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> 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?

Thanks, Jai. Removed it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16861#discussion_r1411051514


More information about the nio-dev mailing list