RFR: 8207329: Add NIL Constant to UUID
Roger Riggs
rriggs at openjdk.java.net
Fri Nov 27 17:57:54 UTC 2020
On Thu, 26 Nov 2020 15:54:46 GMT, Richard Fussenegger <github.com+1059453+Fleshgrinder at openjdk.org> wrote:
> 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.
The bug report does not make a strong case for adding a NIL constant to the UUID API.
It would add (a small amount) to both footprint and startup time with very limited benefit.
Any application needing a placeholder can do so itself and all existing applications take care of their own needs.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1460
More information about the core-libs-dev
mailing list