On Tue, 1 Jul 2025 01:37:27 GMT, Roger Riggs <rri...@openjdk.org> wrote:
> I think resizing the buffer when the line length exceeds cb.length/2 will be > more efficient (cpu wise). I concur. I missed that this had been changed in the most recent commit. > test/jdk/java/io/Reader/ReadAll.java line 117: > >> 115: sb.setLength(0); >> 116: } >> 117: > > Does one of these cases result in a *very very long line without a > terminator"; something that would trigger the limits of > ArraySupport.newLength at or near Integer.MAX_VALUE - 8? I don't know, but I doubt it. I will look into adding something. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25863#discussion_r2177863145 PR Review Comment: https://git.openjdk.org/jdk/pull/25863#discussion_r2177863858