Skip to content

Commit 52502e7

Browse files
committed
fix(store): implicit narrow type cast
1 parent 6e629b1 commit 52502e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hugegraph-store/hg-store-rocksdb/src/main/java/org/apache/hugegraph/rocksdb/access/SessionOperatorImpl.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ public static final byte[] increaseOne(byte[] bytes) {
5252
assert bytes.length > 0;
5353
byte last = bytes[bytes.length - 1];
5454
if (last != BYTE_MAX_VALUE) {
55-
bytes[bytes.length - 1] += 0x01;
55+
bytes[bytes.length - 1] += (byte) 0x01;
5656
} else {
5757
// Process overflow (like [1, 255] => [2, 0])
5858
int i = bytes.length - 1;
5959
for (; i > 0 && bytes[i] == BYTE_MAX_VALUE; --i) {
60-
bytes[i] += 0x01;
60+
bytes[i] += (byte) 0x01;
6161
}
6262
if (bytes[i] == BYTE_MAX_VALUE) {
6363
assert i == 0;
6464
throw new DBStoreException("Unable to increase bytes: %s", Bytes.toHex(bytes));
6565
}
66-
bytes[i] += 0x01;
66+
bytes[i] += (byte) 0x01;
6767
}
6868
return bytes;
6969
}

0 commit comments

Comments
 (0)