RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v4]
Naoto Sato
naoto at openjdk.java.net
Fri Jun 25 23:10:03 UTC 2021
On Fri, 25 Jun 2021 20:47:21 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and `read(byte[],int,int)` to return zero per the `InputStream` specification when the byte array actual or specified length is zero.
>
> Brian Burkhalter has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
Agree that clarifying the spec would be a much safer solution.
-------------
Marked as reviewed by naoto (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4591
More information about the core-libs-dev
mailing list