On Wed, 13 Apr 2022 14:52:20 GMT, XenoAmess <d...@openjdk.java.net> wrote:
>> It indeed is reallocated when the existing one is not large enough. > >> 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. ------------- PR: https://git.openjdk.java.net/jdk/pull/5872