RFR: 8349121: SSLParameters.setApplicationProtocols() ALPN example could be clarified [v3]
Daniel Fuchs
dfuchs at openjdk.org
Wed Feb 5 18:07:30 UTC 2025
On Wed, 5 Feb 2025 17:42:11 GMT, Bradford Wetmore <wetmore at openjdk.org> wrote:
>> src/java.base/share/classes/javax/net/ssl/SSLParameters.java line 661:
>>
>>> 659: * // Encode 3 Meetei Mayek letters (HUK, UN, I) using Unicode Escapes
>>> 660: * // 0xabcd->0xabcf, 2 Unicode bytes/letter.
>>> 661: * String HUK_UN_I = "\u005cuabcd\u005cuabce\u005cuabcf";
>>
>> jshell> String HUK_UN_I = "\u005cuabcd\u005cuabce\u005cuabcf";
>> | Error:
>> | illegal escape character
>> | String HUK_UN_I = "\u005cuabcd\u005cuabce\u005cuabcf";
>> | ^
>> | Error:
>> | illegal escape character
>> | String HUK_UN_I = "\u005cuabcd\u005cuabce\u005cuabcf";
>> | ^
>> | Error:
>> | illegal escape character
>> | String HUK_UN_I = "\u005cuabcd\u005cuabce\u005cuabcf";
>> | ^
>
> javadoc on "\u005c" produces the "" character.
>
> So "\u005cuabcd" renders "\uabcd..."
>
> The resulting javadoc looks like:
>
> // Encode 3 Meetei Mayek letters (HUK, UN, I) using Unicode Escapes
> // 0xabcd->0xabcf, 2 Unicode bytes/letter.
> String HUK_UN_I = "\uabcd\uabce\uabcf";
>
> That was the way it was done elsewhere in the JDK (e.g. `Arrays`/`URI`/etc.) minus the `{@code...}`, so did the same.
Ahhh! I see. Thanks for the explanation!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23379#discussion_r1943430044
More information about the net-dev
mailing list