RFR: 8286200: SequenceInputStream::read(b, off, 0) returns -1 at EOF

Brian Burkhalter bpb at openjdk.java.net
Thu May 12 15:48:48 UTC 2022


On Thu, 12 May 2022 08:41:47 GMT, Raffaello Giulietti <duke at openjdk.java.net> wrote:

> Also, in the current implementation, when the end of the last contained stream has been reached and `-1` is returned, none of the arguments is checked, so a caller can pass `null` for `b` or out of bounds indices `off` and `len`. This is at odd with the `@throws` clauses.

Resolved by commit 7582dbff416e1fb164cfe924c128eb5ee73084f4.

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

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


More information about the core-libs-dev mailing list