Skip to content

Commit 8a4aee2

Browse files
authored
Merge pull request #767 from zhicwu/jdk8
Fix missing api
2 parents 52164fd + 9cf8ff1 commit 8a4aee2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clickhouse-client/src/main/java/com/clickhouse/client/data/ClickHouseBitmap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,15 +441,15 @@ public static ClickHouseBitmap deserialize(byte[] bytes, ClickHouseDataType inne
441441
}
442442
// replace the last 5 bytes to flag(boolean for signed/unsigned) and map
443443
// size(integer)
444-
buffer.position(buffer.position() - 5);
444+
((Buffer) buffer).position(buffer.position() - 5);
445445
// always unsigned due to limit of CRoaring
446446
buffer.put((byte) 0);
447447
// big-endian -> little-endian
448448
for (int i = 3; i >= 0; i--) {
449449
buffer.put(bitmaps[i]);
450450
}
451451

452-
buffer.position(buffer.position() - 5);
452+
((Buffer) buffer).position(buffer.position() - 5);
453453
bitmaps = new byte[buffer.remaining()];
454454
buffer.get(bitmaps);
455455
Roaring64NavigableMap b = new Roaring64NavigableMap();

clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/util/ClickHouseBitmap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,15 @@ public static ClickHouseBitmap deserialize(byte[] bytes, ClickHouseDataType inne
363363
}
364364
// replace the last 5 bytes to flag(boolean for signed/unsigned) and map
365365
// size(integer)
366-
buffer.position(buffer.position() - 5);
366+
((Buffer) buffer).position(buffer.position() - 5);
367367
// always unsigned due to limit of CRoaring
368368
buffer.put((byte) 0);
369369
// big-endian -> little-endian
370370
for (int i = 3; i >= 0; i--) {
371371
buffer.put(bitmaps[i]);
372372
}
373373

374-
buffer.position(buffer.position() - 5);
374+
((Buffer) buffer).position(buffer.position() - 5);
375375
bitmaps = new byte[buffer.remaining()];
376376
buffer.get(bitmaps);
377377
Roaring64NavigableMap b = new Roaring64NavigableMap();

0 commit comments

Comments
 (0)