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

6594730: UUID.getVersion() is only meaningful for Leach-Salz variant #1467

Closed
wants to merge 1 commit into from

Conversation

@Fleshgrinder
Copy link
Contributor

@Fleshgrinder Fleshgrinder commented Nov 26, 2020


Progress

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

Testing

Linux additional Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (8/8 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) (1/9 failed) (2/9 failed) (1/9 failed) (1/9 failed)

Failed test tasks

Integration blocker

 ⚠️ The change requires a CSR request to be approved.

Issue

  • JDK-6594730: UUID.getVersion() is only meaningful for Leach-Salz variant

Download

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

@bridgekeeper
Copy link

@bridgekeeper 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
Copy link

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

@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 26, 2020

Webrevs

@dfuch
Copy link
Member

@dfuch dfuch commented Nov 26, 2020

/csr

@openjdk openjdk bot added the csr label Nov 26, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 26, 2020

@dfuch 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-6594730. This pull request cannot be integrated until the CSR request is approved.

Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

The version method is described in the javadoc as only being applicable to variant = 2 UUIDs.
Changing the behavior to throw a UnsupportedOperationException is not a compatible change.
There is very little value in adding the exception doing so might prevent existing applications from continuing to function.

Repeating the limitation to version 2 to the javadoc of the version method as far as this request can go.

Otherwise, please close the PR without integrating.

@Fleshgrinder
Copy link
Contributor Author

@Fleshgrinder Fleshgrinder commented Dec 16, 2020

There is very little value in adding the exception doing so might prevent existing applications from continuing to function.

I disagree on the value and am with the author of the original issue. All these existing applications are functioning but factually invalid, adding the exception like we have it in all other methods of the class would surface the issue in exactly those applications.

@LanceAndersen
Copy link
Contributor

@LanceAndersen LanceAndersen commented Dec 17, 2020

There is very little value in adding the exception doing so might prevent existing applications from continuing to function.

I disagree on the value and am with the author of the original issue. All these existing applications are functioning but factually invalid, adding the exception like we have it in all other methods of the class would surface the issue in exactly those applications.

While I can appreciate that the current behavior might be less than ideal, changing it to throw an UnsupportedOperationException could break existing applications. Have you had a chance to research the number of uses of version() in the java eco-system to determine that the risk to existing applications will minimal?

If you feel that the change in functionality is important for users of UUID, then please propose a replacement method for version and propose to deprecate the existing method ?

If you decide to move forward with proposing a replacement method for version, then please socialize the proposal on corelibs-dev prior to creating a new PR.

Please note that a CSR will also be required to move forward.

@Fleshgrinder
Copy link
Contributor Author

@Fleshgrinder Fleshgrinder commented Dec 17, 2020

I cannot create CSRs, only members can. Deprecating and switching to another function results in much more work for users overall because it affects all those who use it correctly as well. In other words: 100%

I'm in favor of rejection if that's the way forward.

What's wrong with creating PRs for existing issues? I thought that more contributions is actually the reason OpenJDK came to GitHub. 😉

@RogerRiggs
Copy link
Contributor

@RogerRiggs RogerRiggs commented Dec 17, 2020

Often an enhancement is created when there's an idea of an improvement but no resources to do the research and develop a justification. That work has to be done when someone has time. Usually ideas are discussed on one of the many OpenJDK email aliases to validate the idea and the approach before developing the code. See the list of OpenJDK Mail lists for details.
https://mail.openjdk.java.net/mailman/listinfo
As for moving to GitHub, it was in part to make it easier to collaborate on the development but also to move from Mercurial to Git.
But GitHub does not replace the need for discussion on the Email Lists.

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 15, 2021

@Fleshgrinder This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@Fleshgrinder
Copy link
Contributor Author

@Fleshgrinder Fleshgrinder commented Jan 15, 2021

Active

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 15, 2021

Mailing list message from some-java-user-99206970363698485155 at vodafonemail.de on core-libs-dev:

The following probably does not matter much because I am not an OpenJDK contributor, but personally
I think throwing an UnsupportedOperationException is reasonable:
1. It is consistent with the other methods which also only work for one specific variant
2. Code which calls UUID.version() on a non-variant 2 UUID is obviously already functionally broken;
I don't think maintaining backward compatibility here adds any value

Regarding the pull request, I would recommend the following changes:
1. Replace ` ` with a normal space, that should work as well and is easier to read
2. Add a sentence to the method description (and not only to the `@throws` tag), that this method
is only meaningful for variant 2 UUIDs, see for example the documentation for `timestamp()` for
how this sentence should look like to be consistent:
https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/util/UUID.html#timestamp()

Kind regards

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 15, 2021

Mailing list message from some-java-user-99206970363698485155 at vodafonemail.de on core-libs-dev:

1. Replace ` ` with a normal space, that should work as well and is easier to read

Looks like my e-mail client was so kind and replaced the HTML character reference. It should have said:
"Replace `& nbsp ;` with a normal space, ..."

Additionally, if you want to search for projects using UUID.version() you can use the following
CodeQL query:
https://lgtm.com/query/283083268427438766/

You can (in addition to the example projects), specify custom projects to scan as well, see
https://lgtm.com/help/lgtm/project-lists.

Kind regards

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 12, 2021

@Fleshgrinder This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@Fleshgrinder
Copy link
Contributor Author

@Fleshgrinder Fleshgrinder commented Feb 12, 2021

Active

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 21, 2021

@Fleshgrinder This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@Fleshgrinder
Copy link
Contributor Author

@Fleshgrinder Fleshgrinder commented Apr 21, 2021

Active

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 19, 2021

@Fleshgrinder This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@Fleshgrinder
Copy link
Contributor Author

@Fleshgrinder Fleshgrinder commented May 19, 2021

@Bridgekeeper I guess it will stay open for a little longer. 😜

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jun 16, 2021

@Fleshgrinder This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants