Skip to content
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

Closed
wants to merge 1 commit into from
Closed

8207329: Add NIL Constant to UUID #1460

wants to merge 1 commit into from

Conversation

Fleshgrinder
Copy link
Contributor

@Fleshgrinder Fleshgrinder commented Nov 26, 2020

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 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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Integration blockers

 ⚠️ The change requires a CSR request to be approved.
 ⚠️ Title mismatch between PR and JBS for issue JDK-8207329

Issue

  • JDK-8207329: Add a constant for a nil UUID value of all zeros: java.util.UUID.NIL ⚠️ Title mismatch between PR and JBS. ⚠️ Issue is not open.

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1460/head:pull/1460
$ git checkout pull/1460

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
phillebaba Philip Laine
Adds a constant for the special NIL UUID where all bits are zero to `java.util.UUID`.
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 26, 2020

👋 Welcome back Fleshgrinder! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 26, 2020
@openjdk
Copy link

openjdk bot commented Nov 26, 2020

@Fleshgrinder The following label will be automatically applied to this pull request:

  • core-libs

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.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Nov 26, 2020
@mlbridge
Copy link

mlbridge bot commented Nov 26, 2020

Webrevs

@Fleshgrinder
Copy link
Contributor Author

/csr

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Nov 27, 2020
@openjdk
Copy link

openjdk bot commented Nov 27, 2020

@Fleshgrinder has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@Fleshgrinder please create a CSR request and add link to it in JDK-8207329. This pull request cannot be integrated until the CSR request is approved.

@RogerRiggs
Copy link
Contributor

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.

@Fleshgrinder
Copy link
Contributor Author

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 new UUID(0, 0) is already simple enough.

@RogerRiggs
Copy link
Contributor

There being no other comments supporting this enhancement, I propose to close this PR without integrating.
I'll take care of closing the bug as will-not-fix. It can be reopened if new information becomes available.

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.

@Fleshgrinder Fleshgrinder deleted the JDK-8207329 branch December 2, 2020 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

None yet

2 participants