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

Naoto Sato naoto at openjdk.org
Tue Nov 28 19:30:36 UTC 2023


On Tue, 28 Nov 2023 19:23:45 GMT, Brian Burkhalter <bpb 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 294:
> 
>> 292:     private void lockedFillZeroToPosition() throws IOException {
>> 293:         ensureOpen();
>> 294:         Arrays.fill(bb.array(), 0, bb.arrayOffset() + bb.position(), (byte)0);
> 
> Should the `from` parameter be zero or `bb.arrayOffset()`?

Right. Fixed.

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

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


More information about the nio-dev mailing list