From 8ca2481df14f345a008e5cc63c5da3a0382f0a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Cedomir=20Igaly?= Date: Mon, 7 Oct 2024 15:33:56 +0200 Subject: [PATCH] HHH-18377 Removed masking that is not needed --- .../main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java | 2 +- .../main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java b/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java index ae4806e676..abbd139459 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java @@ -112,7 +112,7 @@ public class UuidVersion6Strategy implements UUIDGenerationStrategy, UuidValueGe // LSB bits 0-1 - variant = 4 0x8000_0000_0000_0000L // LSB bits 2-15 - clock sequence - | ( state.lastSequence & 0x3FFFL ) << 48 + | (long) state.lastSequence << 48 // LSB bits 16-63 - pseudorandom data, least significant bit of the first octet is set to 1 | randomNode() ); diff --git a/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java b/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java index 2bd0a9ebf7..e4224b21c4 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java @@ -116,7 +116,7 @@ public class UuidVersion7Strategy implements UUIDGenerationStrategy, UuidValueGe // LSB bits 0-1 - variant = 4 0x8000_0000_0000_0000L // LSB bits 2-15 - counter - | ( state.lastSequence & 0x3FFFL ) << 48 + | (long) state.lastSequence << 48 // LSB bits 16-63 - pseudorandom data | randomNode() );