On Wed, 8 Oct 2025 21:33:19 GMT, Roger Riggs <[email protected]> wrote:
>> As Bokken highlighted, I think it might be worth adding a method (similar to
>> the below) to extract the timestamp from v7 UUIDs?
>>
>>
>> public long epochMilliTimestamp() {
>> if (version() != 7) {
>> throw new UnsupportedOperationException("Not a version 7 UUID");
>> }
>> return (mostSigBits >>> 16) & 0xFFFFFFFFFFFFL;
>> }
>>
>>
>> Regarding, the issues around comparison, as mentioned I think would it would
>> be worth updating the current `compareTo` doc to identify that the
>> implmentation uses signed long comparison and may not provide lexographical
>> sorting in align with the rfc which can be problmetaic for time based UUIDs
>> and also to add a seperate instance method but with lexographical sorting
>> using unsigned comparrsion.
>
> @kieran-farrell Please update the CSR with the current single API addition.
@RogerRiggs good with me, CSR has been updated now
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25303#issuecomment-3385157330