On Sat, 20 Aug 2022 08:03:55 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Naoto Sato has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Modified the test per review suggestion
>
> test/jdk/java/io/InputStreamReader/StatefulDecoderNearEOF.java line 53:
> 
>> 51:                     
>> StandardCharsets.UTF_16.newDecoder().onMalformedInput(CodingErrorAction.REPORT)))
>>  {
>> 52:                 System.out.printf("%04x%n", r.read()); // \u00d8 (wrong, 
>> uses UTF-16BE)
>> 53:                 System.out.printf("%04x%n", r.read()); // EOF
> 
> This will pass if either read fails, I think the test should be checking that 
> the first call to read throws MalformedInputException.
> 
> Would it be feasible to add a second test where there are characters between 
> the BOM and the truncated high surrogate? It would be possible to decode 
> those characters before it fails at the end of the stream.

Addressed both points.

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

PR: https://git.openjdk.org/jdk/pull/9945

Reply via email to