8274686: java.util.UUID#hashCode() should use Long.hashCode()

Reviewed-by: rriggs
This commit is contained in:
Petr Portnov 2021-11-08 13:22:37 +00:00 committed by Roger Riggs
parent 0c2d00bff7
commit cc2cac130c

View File

@ -468,8 +468,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
long hilo = mostSigBits ^ leastSigBits; return Long.hashCode(mostSigBits ^ leastSigBits);
return ((int)(hilo >> 32)) ^ (int) hilo;
} }
/** /**