From 2e2d9c57a39425273d12b49183b55b46b5c680b2 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Mon, 17 Apr 2023 13:42:05 +0200 Subject: Build with jdk20 --- .../com/yahoo/search/predicate/index/CachedPostingListCounter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'predicate-search/src/main/java/com/yahoo/search/predicate/index') diff --git a/predicate-search/src/main/java/com/yahoo/search/predicate/index/CachedPostingListCounter.java b/predicate-search/src/main/java/com/yahoo/search/predicate/index/CachedPostingListCounter.java index e6db1dec7c3..eb8b0b9927b 100644 --- a/predicate-search/src/main/java/com/yahoo/search/predicate/index/CachedPostingListCounter.java +++ b/predicate-search/src/main/java/com/yahoo/search/predicate/index/CachedPostingListCounter.java @@ -75,7 +75,7 @@ public class CachedPostingListCounter { private void countUsingBitVector(byte[] nPostingListsForDocument, int postingListBitmap) { for (int docId = 0; docId < nDocuments; docId++) { - nPostingListsForDocument[docId] += Integer.bitCount(bitVector[docId] & postingListBitmap); + nPostingListsForDocument[docId] += (byte)Integer.bitCount(bitVector[docId] & postingListBitmap); } } @@ -88,8 +88,7 @@ public class CachedPostingListCounter { } public CachedPostingListCounter rebuildCache() { - MinMaxPriorityQueue mostExpensive = MinMaxPriorityQueue - .maximumSize(32).expectedSize(32).create(); + MinMaxPriorityQueue mostExpensive = MinMaxPriorityQueue.maximumSize(32).expectedSize(32).create(); synchronized (this) { for (ObjectLongPair p : frequency.keyValuesView()) { mostExpensive.add(new Entry(p.getOne(), p.getTwo())); -- cgit v1.2.3