On Thu, 6 Feb 2025 19:47:54 GMT, Artur Barashev <[email protected]> wrote:
>> I still think that `Convert to the default ALPN encoding` comment is less
>> confusing, we are just passing the string in the encoding that the library
>> expects. Basically your comment assumes reader's familiarity with the RFC.
>
> `Convert UTF-8 bytes to the string with default ALPN encoding` also sounds
> like an option.
But we're not converting anything.
What we do here is preserving the bytes encoded in UTF-8 by shoe-horning them
into a string so that we get the same UTF-8 encoded bytes when the stack later
calls String.getBytes("ISO_8859_1").
So "convert" would be misleading.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23379#discussion_r1945478698