RFR: 8207329: Add NIL Constant to UUID

Richard Fussenegger github.com+1059453+fleshgrinder at openjdk.java.net
Thu Nov 26 16:02:03 UTC 2020


Adds a constant for the special NIL UUID where all bits are zero to `java.util.UUID`. The [8207329](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8207329) mentions the usage of it to avoid `null`, it for sure is also very handy in testing where a UUID is required and we do not care about its actual value. Using a random UUID stresses the PRNG for no good reason.

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

Commit messages:
 - 8207329: Add NIL Constant to UUID

Changes: https://git.openjdk.java.net/jdk/pull/1460/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1460&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8207329
  Stats: 18 lines in 2 files changed: 17 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1460.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1460/head:pull/1460

PR: https://git.openjdk.java.net/jdk/pull/1460


More information about the core-libs-dev mailing list