Skip to content

Conversation

@wenshao
Copy link
Contributor

@wenshao wenshao commented Apr 30, 2025

Similar to #24959, java.util.Locale.hashCode can also make the same improvement.

Replace manual bitwise operations in hashCode implementations of java.util.Locale with Double::hashCode.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8356021: Use Double::hashCode in java.util.Locale::hashCode (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24971/head:pull/24971
$ git checkout pull/24971

Update a local copy of the PR:
$ git checkout pull/24971
$ git pull https://git.openjdk.org/jdk.git pull/24971/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24971

View PR using the GUI difftool:
$ git pr show -t 24971

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24971.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 30, 2025

👋 Welcome back swen! 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 bot commented Apr 30, 2025

@wenshao This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8356021: Use Double::hashCode in java.util.Locale::hashCode

Reviewed-by: rriggs, liach

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 14 new commits pushed to the master branch:

  • 34807df: 8355779: When no "signature_algorithms_cert" extension is present we do not apply certificate scope constraints to algorithms in "signature_algorithms" extension
  • 7b31762: 8354235: Test javax/net/ssl/SSLSocket/Tls13PacketSize.java failed with java.net.SocketException: An established connection was aborted by the software in your host machine
  • 0cd0afb: 8355913: RISC-V: improve hotspot/jtreg/compiler/vectorization/runner/BasicFloatOpTest.java
  • ... and 11 more: https://git.openjdk.org/jdk/compare/18983b635fe3469c1d9060611eee76e0155ba21b...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Apr 30, 2025

@wenshao The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Apr 30, 2025
Co-authored-by: Chen Liang <liach@openjdk.org>
@wenshao wenshao changed the title Use Long::hashCode in java.util.Locale::hashCode Use Double::hashCode in java.util.Locale::hashCode Apr 30, 2025
@wenshao wenshao marked this pull request as ready for review April 30, 2025 23:14
@wenshao wenshao changed the title Use Double::hashCode in java.util.Locale::hashCode 8355391: Use Double::hashCode in java.util.Locale::hashCode Apr 30, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 30, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 30, 2025

Webrevs

@wenshao wenshao changed the title 8355391: Use Double::hashCode in java.util.Locale::hashCode 8356021: Use Double::hashCode in java.util.Locale::hashCode May 1, 2025
Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgltm

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 1, 2025
Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this cleanup, indeed equivalent.

@wenshao
Copy link
Contributor Author

wenshao commented May 1, 2025

/integrate

@openjdk
Copy link

openjdk bot commented May 1, 2025

Going to push as commit 2ad639f.
Since your change was applied there have been 15 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 1, 2025
@openjdk openjdk bot closed this May 1, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 1, 2025
@openjdk
Copy link

openjdk bot commented May 1, 2025

@wenshao Pushed as commit 2ad639f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@naotoj
Copy link
Member

naotoj commented May 1, 2025

Thanks for the fix. Even though the fix is trivial and small, please keep the PR open at least for 24 hours so that every region of the globe can see the fix.

@wenshao
Copy link
Contributor Author

wenshao commented May 1, 2025

@naotoj Thank you for your reminder. There is a problem with GitHub's prompt. It shows yesterday in less than 24 hours. I will avoid this problem next time.

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 i18n i18n-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants