RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v14]

Jaikiran Pai jpai at openjdk.org
Tue Sep 23 16:52:31 UTC 2025


On Tue, 23 Sep 2025 14:18:27 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Given all this, I think the API we provide must try and achieve these primary motivations. That would then mean, not allowing arbitrary values to be passed by applications for generating a UUIDv7 UUID instance.

To phrase that differently - should we introduce this/these API(s) in Java SE to allow for `UUID` instances just be structurally UUIDv7 type or should we also enforce other semantics (like monotonicity) expected of UUIDv7 type. If it's the latter, then I think we shouldn't let applications pass the timestamp value when constructing these UUID instances. My opinion is that providing a Java SE API to construct a `UUID` instance which is merely structurally UUIDv7 isn't too useful.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25303#issuecomment-3324823233


More information about the core-libs-dev mailing list