On Fri, 2 Jul 2021 16:55:18 GMT, Brian Burkhalter <[email protected]> wrote:
>> Modify the specification of
>> `java.io.ByteArrayInputStream#read(byte[],int,int)` to indicate that `-1` is
>> returned instead of `0` when the stream is at its end and the third
>> parameter, `len`, is zero.
>
> 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"?
-------------
PR: https://git.openjdk.java.net/jdk17/pull/189