RFR: 8349121: SSLParameters.setApplicationProtocols() ALPN example could be clarified [v3]
Bradford Wetmore
wetmore at openjdk.org
Wed Feb 5 17:57:18 UTC 2025
On Wed, 5 Feb 2025 12:02:26 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Bradford Wetmore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Codereview Comments
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23379#discussion_r1943396016
More information about the net-dev
mailing list