RFR: 8279283 - (ch) BufferedInputStream should override transferTo

Markus KARG duke at openjdk.java.net
Mon Dec 27 09:33:10 UTC 2021


On Mon, 27 Dec 2021 08:50:26 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> BIS is not specified to be thread safe but the existing read/write operations are. If transferTo is overridden then this is an area that will require close attention.

In analogy to the other read/write operations I now have synchronized transferTo in https://github.com/openjdk/jdk/pull/6935/commits/8dac240d2716a9d14c997ea62b7f96637acc8d66 to be on the safe side.

> Have you surveyed the existing tests to see if transferTo is invoked on a BIS? New tests may be needed.

Did not find an existing test for BIS.transferTo, so I will write a new test for this.

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

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


More information about the core-libs-dev mailing list