RFR: 8284638: store skip buffers in InputStream Object [v2]

XenoAmess duke at openjdk.java.net
Thu Apr 14 17:21:30 UTC 2022


On Wed, 13 Apr 2022 15:09:27 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>>> I recommend moving `nr` declaration from the beginning of the method to where it's actually used (here)
>> 
>> @liach done.
>
> Sorry, I misunderstood your earlier comment: "Sounds reasonable and applied"
> as concurring with not re-allocating to avoid the overhead of gc and wasting the smaller buffer.
> The code can be harder to understand because `size` and `skipBuffer.length` may be different.

@RogerRiggs
Rethink of this, I kind of prefer the soft reference plan @liach shown....

> The code can be harder to understand because `size` and `skipBuffer.length` may be different.

yes...

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

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


More information about the core-libs-dev mailing list