RFR: 8296431 - PushbackInputStream should override transferTo [v2]

Markus KARG duke at openjdk.org
Sat Nov 5 08:50:54 UTC 2022


On Sat, 5 Nov 2022 07:19:32 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Markus KARG has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixed wrong bug number
>
> src/java.base/share/classes/java/io/PushbackInputStream.java line 416:
> 
>> 414:         Objects.requireNonNull(out, "out");
>> 415:         ensureOpen();
>> 416:         if (lock != null) {
> 
> PushbackInputStream's read methods are not synchronised so it doesn't make sense to introduce this for transferTo. In other words, I think we should leave "closekLock" as it was.

I have undone that change, so this PR only introduces the performance optimization now.

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

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


More information about the core-libs-dev mailing list