On Sat, 8 Jun 2024 23:30:38 GMT, Shaojin Wen <[email protected]> wrote:
>> After PR #16245, C2 optimizes stores into primitive arrays by combining
>> values into larger stores. In the UUID.toString method,
>> ByteArrayLittleEndian can be removed, making the code more elegant and
>> faster.
>
> Shaojin Wen has updated the pull request incrementally with one additional
> commit since the last revision:
>
> change method name, putHex -> putHex4, and fix comments
src/java.base/share/classes/java/util/UUID.java line 1:
> 1: /*
We can update copyright year to 2024
src/java.base/share/classes/jdk/internal/util/HexDigits.java line 1:
> 1: /*
We can update copyright header to `Copyright (c) 2023, 2024, Oracle ...`
src/java.base/share/classes/jdk/internal/util/HexDigits.java line 118:
> 116: /**
> 117: * Insert the unsigned 2-byte integer into the buffer as 4
> hexadecimal digit ASCII bytes,
> 118: * {@code i} only least significant 16 bits are used.
Suggestion:
* only least significant 16 bits of {@code i} are used.
src/java.base/share/classes/jdk/internal/util/HexDigits.java line 123:
> 121: * @param i to convert
> 122: */
> 123: public static void putHex4(byte[] buffer, int off, int i) {
I recommend the name `put4`. `Hex` is redundant within the context of
`HexDigits`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19610#discussion_r1632187884
PR Review Comment: https://git.openjdk.org/jdk/pull/19610#discussion_r1632187984
PR Review Comment: https://git.openjdk.org/jdk/pull/19610#discussion_r1632187743
PR Review Comment: https://git.openjdk.org/jdk/pull/19610#discussion_r1632187666