RFR: 8349121: SSLParameters.setApplicationProtocols() ALPN example could be clarified [v3]
Daniel Fuchs
dfuchs at openjdk.org
Thu Feb 6 21:24:16 UTC 2025
On Thu, 6 Feb 2025 19:47:54 GMT, Artur Barashev <abarashev at openjdk.org> 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
More information about the net-dev
mailing list