Skip to content

Commit cc2cac1

Browse files
JarvisCraftRoger Riggs
authored andcommitted
8274686: java.util.UUID#hashCode() should use Long.hashCode()
Reviewed-by: rriggs
1 parent 0c2d00b commit cc2cac1

File tree

1 file changed

+1
-2
lines changed
  • src/java.base/share/classes/java/util

1 file changed

+1
-2
lines changed

src/java.base/share/classes/java/util/UUID.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ public String toString() {
468468
*/
469469
@Override
470470
public int hashCode() {
471-
long hilo = mostSigBits ^ leastSigBits;
472-
return ((int)(hilo >> 32)) ^ (int) hilo;
471+
return Long.hashCode(mostSigBits ^ leastSigBits);
473472
}
474473

475474
/**

0 commit comments

Comments
 (0)