RFR: 8255878: FilterInputStream is missing implementations of Java 9 InputStream methods [v2]

Alan Bateman alanb at openjdk.java.net
Mon Sep 6 12:05:40 UTC 2021


On Mon, 6 Sep 2021 09:41:54 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> readAllBytes/readNBytes no longer call any variant of `this.read` - so any subclass that implement the two `read` methods to do something more than what `in.read` does might fail in unexpected ways if `readAllBytes` or `readNBytes` are called. I'm especially concerned with subclasses like e.g. `KeepAliveStream` / `MetteredStream` in `sun.net.www.http`

Ah yes, I think you are right. In that case JDK-8255878 can be closed as WNF or else FilterInputStream provides implementations of these methods that don't directly delegate.

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

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


More information about the core-libs-dev mailing list