-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8207329: Add NIL Constant to UUID #1460
Conversation
Adds a constant for the special NIL UUID where all bits are zero to `java.util.UUID`.
👋 Welcome back Fleshgrinder! A progress list of the required criteria for merging this PR into |
@Fleshgrinder The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
/csr |
@Fleshgrinder has indicated that a compatibility and specification (CSR) request is needed for this pull request. |
The bug report does not make a strong case for adding a NIL constant to the UUID API. |
For me it's mostly useful in tests but we cannot ship test only code. We could fix the issues you mention through lazy initialization, or we simply close the PR and ticket and state that the construction via |
There being no other comments supporting this enhancement, I propose to close this PR without integrating. For any API addition, its useful to do an email query on core-libs-dev@openjdk.net to see if there is support for API enhancements. Thank you. |
Adds a constant for the special NIL UUID where all bits are zero to
java.util.UUID
. The 8207329 mentions the usage of it to avoidnull
, 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.Progress
Integration blockers
Issue
java.util.UUID.NIL
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1460/head:pull/1460
$ git checkout pull/1460