Skip to content

Commit

Permalink
8274686: java.util.UUID#hashCode() should use Long.hashCode()
Browse files Browse the repository at this point in the history
Reviewed-by: rriggs
  • Loading branch information
JarvisCraft authored and Roger Riggs committed Nov 8, 2021
1 parent 0c2d00b commit cc2cac1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/java.base/share/classes/java/util/UUID.java
Expand Up @@ -468,8 +468,7 @@ public String toString() {
*/
@Override
public int hashCode() {
long hilo = mostSigBits ^ leastSigBits;
return ((int)(hilo >> 32)) ^ (int) hilo;
return Long.hashCode(mostSigBits ^ leastSigBits);
}

/**
Expand Down

1 comment on commit cc2cac1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.