Skip to content

Commit 52b6a3a

Browse files
committed
fix bit manipulation
1 parent fc61dc9 commit 52b6a3a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

roaringbitmap/src/main/java/org/roaringbitmap/art/LeafNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ public long getContainerIdx() {
145145
}
146146

147147
public byte[] getKeyBytes() {
148-
return LongUtils.highPart(getKey() >> 16);
148+
return LongUtils.highPart(getKey() << 16);
149149
}
150150

151151
public long getKey() {
152-
return ((long) keyHigh) << 32 | ((long)keyLow) << 16;
152+
return (((long) keyHigh) & 0xFFFFFFFFL) << 16 | (((long)keyLow) & 0xFFFFL);
153153
}
154154

155155
/**

0 commit comments

Comments
 (0)