[jdk17] RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

Brian Burkhalter bpb at openjdk.java.net
Fri Jul 2 16:58:20 UTC 2021


On Fri, 2 Jul 2021 16:50:11 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   6766844: Correct error messages in test
>
> test/jdk/java/io/ByteArrayInputStream/ReadAllReadNTransferTo.java line 57:
> 
>> 55:         }
>> 56:         if (bais.read(new byte[1], 0, 0) != -1) {
>> 57:             throw new RuntimeException("read(byte[],int,int) did not return 0");
> 
> Should these exception messages be "did not return -1"?

Oh you are correct. Thanks!

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

PR: https://git.openjdk.java.net/jdk17/pull/189


More information about the core-libs-dev mailing list