RFR: 8279283 - BufferedInputStream should override transferTo [v5]

Сергей Цыпанов duke at openjdk.org
Thu Jul 7 07:37:44 UTC 2022


On Mon, 27 Dec 2021 13:43:12 GMT, Markus KARG <duke at openjdk.org> wrote:

>> Implementation of JDK-8279283
>
> Markus KARG has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed missing BufferedInputStream

src/java.base/share/classes/java/io/BufferedInputStream.java line 495:

> 493:         int avail = count - pos;
> 494:         if (avail > 0) {
> 495:             out.write(buf, pos, avail);

I think `buf` should not be accessed directly but via `getBufIfOpen()` because we need to throw IOE in case `this` is closed.

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

PR: https://git.openjdk.org/jdk/pull/6935


More information about the core-libs-dev mailing list