RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v16]
Alan Bateman
alanb at openjdk.org
Thu Oct 23 09:48:12 UTC 2025
On Wed, 22 Oct 2025 21:26:25 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> The rest of the changes in the PR looks fine to me. Before reviewing the CSR, I think we should come to an agreement on the method naming.
>>
>> I prefer `fromEpochMillis(...)` instead of the current `epochMillis(...)`. @RogerRiggs, @AlanBateman which one of these method names do you suggest we proceed with?
>
> Not to thrash on the name but `fromEpochMillis(millis))` is a good name similar to `fromString(String)`.
> I prefer `fromEpochMillis(...)` instead of the current `epochMillis(...)`. @RogerRiggs, @AlanBateman which one of these method names do you suggest we proceed with?
The JDK has used `of` and `ofXXX` for static factory methods in recent years. There are a few cases that introduce `fromXXX`, often for cases with more parsing and failure conditions. It's impossible to be 100% consistent. I think `UUID.ofEpochMillis(long)` would work here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25303#discussion_r2454541141
More information about the core-libs-dev
mailing list