On Tue, 16 Feb 2021 23:52:09 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> Philippe Marschall has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Replace c-style array declarations
>>  - Share work buffer between #skip and #read
>
> test/jdk/java/io/InputStreamReader/ReadCharBuffer.java line 73:
> 
>> 71:         }
>> 72: 
>> 73:         buffer.clear();
> 
> I think `buffer.rewind()` would be more in keeping with the specification 
> verbiage although there will be no practical effect here. Same comment 
> applies below and in the other test `ReadCharBuffer`.

`buffer.rewind()` would not work in this specific case as it does not reset the 
limit. I want to assert the entire buffers content to make sure the method 
didn't accidentally write where it shouldn't have. Therefore limit needs to be 
set to capacity.

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

PR: https://git.openjdk.java.net/jdk/pull/1915

Reply via email to