RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v12]
Kieran Farrell
kfarrell at openjdk.org
Thu Jul 3 09:55:43 UTC 2025
On Thu, 3 Jul 2025 07:03:19 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Kieran Farrell has updated the pull request incrementally with one additional commit since the last revision:
>>
>> rm whitespace
>
> src/java.base/share/classes/java/util/UUID.java line 212:
>
>> 210: * @since 26
>> 211: */
>> 212: public static UUID unixEpochTimeMillis() {
>
> Is there a list anywhere on the names that have been discussed already? Asking because the existing static factory method for a type 4 is randomUUID(). Also, there are several methods (esp. in java.time) that use "Epoch" in method names name rather than "Unix Epoch". Also if you rename the timestamp parameter to something that includes "millis" in the name then it would help usage in IDEs where it's more obvious at the use-site that the parameter is in millis.
The original proposed name was `timestampUUID` but it was decided against to avoid confusion with UUID-v1, which is also time-based, there hasnt been much discussion beyond that. Maybe something like `epochMilliUUID()` would better follow the naming conventions?
Reagarding the parameter, updating to something like `epochMillis` or `timestampMillis` would make sense.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25303#discussion_r2182365873
More information about the core-libs-dev
mailing list