RFR: 8355391: Use Double::hashCode in java.util.Locale::hashCode

Shaojin Wen swen at openjdk.org
Wed Apr 30 23:27:22 UTC 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.

-------------

Commit messages:
 - Update src/java.base/share/classes/java/util/Locale.java
 - Use Long::hashCode

Changes: https://git.openjdk.org/jdk/pull/24971/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24971&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8355391
  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/24971.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24971/head:pull/24971

PR: https://git.openjdk.org/jdk/pull/24971


More information about the core-libs-dev mailing list