RFR: 8311207: Cleanup for Optimization for UUID.toString [v14]
Claes Redestad
redestad at openjdk.org
Sat Sep 9 06:45:40 UTC 2023
On Fri, 8 Sep 2023 23:49:04 GMT, Chen Liang <liach at openjdk.org> wrote:
>> src/java.base/share/classes/java/util/HexDigits.java line 66:
>>
>>> 64: */
>>> 65: @Stable
>>> 66: private static final short[] DIGITS;
>>
>> Maybe it should be `char[]` instead since it’s encoded using unsigned 16‑bit integers.
>
> a char would confuse people that each char represents one character, while it represents 2 in fact.
@liach has a fair point. Either way it should be performance neutral.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14745#discussion_r1320498655
More information about the core-libs-dev
mailing list