Skip to content

Commit 29a655d

Browse files
committed
fix 2 CodeQL issues
1 parent e2b9d3f commit 29a655d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/org/apache/datasketches/kll/KllMiscItemsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,13 @@ public void checkIssue484() {
446446
byte[] serialized = sketch.toByteArray();
447447
KllItemsSketch<Boolean> deserialized =
448448
KllItemsSketch.wrap(Memory.wrap(serialized), Boolean::compareTo, new ArrayOfBooleansSerDe());
449-
checkSketchesEqual(items, sketch, deserialized);
449+
checkSketchesEqual(sketch, deserialized);
450450
}
451451

452-
private static <T> void checkSketchesEqual(T[] items, KllItemsSketch<T> expected, KllItemsSketch<T> actual) {
452+
private static <T> void checkSketchesEqual(KllItemsSketch<T> expected, KllItemsSketch<T> actual) {
453453
KllItemsSketchSortedView<T> expSV = expected.getSortedView();
454454
KllItemsSketchSortedView<T> actSV = actual.getSortedView();
455-
long N = actSV.getN();
455+
int N = (int)actSV.getN();
456456
long[] expCumWts = expSV.getCumulativeWeights();
457457
Boolean[] expItemsArr = (Boolean[])expSV.getQuantiles();
458458
long[] actCumWts = actSV.getCumulativeWeights();

0 commit comments

Comments
 (0)