Skip to content

Commit 8ca2481

Browse files
cigalybeikov
authored andcommitted
HHH-18377 Removed masking that is not needed
1 parent 3419f8f commit 8ca2481

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public UUID generateUuid(final SharedSessionContractImplementor session) {
112112
// LSB bits 0-1 - variant = 4
113113
0x8000_0000_0000_0000L
114114
// LSB bits 2-15 - clock sequence
115-
| ( state.lastSequence & 0x3FFFL ) << 48
115+
| (long) state.lastSequence << 48
116116
// LSB bits 16-63 - pseudorandom data, least significant bit of the first octet is set to 1
117117
| randomNode()
118118
);

hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public UUID generateUuid(final SharedSessionContractImplementor session) {
116116
// LSB bits 0-1 - variant = 4
117117
0x8000_0000_0000_0000L
118118
// LSB bits 2-15 - counter
119-
| ( state.lastSequence & 0x3FFFL ) << 48
119+
| (long) state.lastSequence << 48
120120
// LSB bits 16-63 - pseudorandom data
121121
| randomNode()
122122
);

0 commit comments

Comments
 (0)