RFR: 8349121: SSLParameters.setApplicationProtocols() ALPN example could be clarified [v3]
Artur Barashev
abarashev at openjdk.org
Thu Feb 6 21:40:11 UTC 2025
On Thu, 6 Feb 2025 21:21:36 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> `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.
Yes, that's what we do. What I meant is that we are converting data types, not the data itself: we are converting UTF-8 bytes into the string with the encoding expected by the library.
I guess it will be confusing either way for anyone not familiar with encodings, so I'm fine if Brad wants to keep `octet byte ordering`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23379#discussion_r1945500174
More information about the net-dev
mailing list