mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8286378: Address possibly lossy conversions in java.base
Reviewed-by: naoto, xuelei, bpb, alanb
This commit is contained in:
parent
0a6832b24c
commit
17c52789b7
32 changed files with 68 additions and 71 deletions
|
@ -152,7 +152,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
randomBytes[6] &= 0x0f; /* clear version */
|
||||
randomBytes[6] |= 0x40; /* set to version 4 */
|
||||
randomBytes[8] &= 0x3f; /* clear variant */
|
||||
randomBytes[8] |= 0x80; /* set to IETF variant */
|
||||
randomBytes[8] |= (byte) 0x80; /* set to IETF variant */
|
||||
return new UUID(randomBytes);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
md5Bytes[6] &= 0x0f; /* clear version */
|
||||
md5Bytes[6] |= 0x30; /* set to version 3 */
|
||||
md5Bytes[8] &= 0x3f; /* clear variant */
|
||||
md5Bytes[8] |= 0x80; /* set to IETF variant */
|
||||
md5Bytes[8] |= (byte) 0x80; /* set to IETF variant */
|
||||
return new UUID(md5Bytes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue