RFR: 8316681: Rewrite URLEncoder.encode to use small reusable buffers [v4]
Claes Redestad
redestad at openjdk.org
Fri Sep 22 08:37:08 UTC 2023
On Fri, 22 Sep 2023 06:24:44 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> REPLACE, add comment, add tests verifying that surrogate pairs at boundary works.
>
> src/java.base/share/classes/java/net/URLEncoder.java line 296:
>
>> 294: }
>> 295:
>> 296: private static void flushToStringBuilder(StringBuilder out, CharsetEncoder ce, CharBuffer cb, ByteBuffer bb, boolean endOfInput) {
>
> This method would benefit from a comment to summarise the parameters, only because there are so many.
>
> Also just a formatting nit is that this line is much longer than everything else in the file so maybe side-by-side diffs a bit difficult to look at.
Added a comment and split up the line.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15865#discussion_r1334067278
More information about the net-dev
mailing list