aboutsummaryrefslogtreecommitdiffstats
path: root/predicate-search/src/main/java/com/yahoo/search/predicate/index
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-04-17 13:42:05 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-04-17 13:42:05 +0200
commit2e2d9c57a39425273d12b49183b55b46b5c680b2 (patch)
treea43c07e48fa822c1c9330cdf3edd64cbfa2cbf4e /predicate-search/src/main/java/com/yahoo/search/predicate/index
parentb66f35888ad413800ac16f841582da5bf067cb7f (diff)
Build with jdk20
Diffstat (limited to 'predicate-search/src/main/java/com/yahoo/search/predicate/index')
-rw-r--r--predicate-search/src/main/java/com/yahoo/search/predicate/index/CachedPostingListCounter.java5
1 files changed, 2 insertions, 3 deletions
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<Entry> mostExpensive = MinMaxPriorityQueue
- .maximumSize(32).expectedSize(32).create();
+ MinMaxPriorityQueue<Entry> mostExpensive = MinMaxPriorityQueue.maximumSize(32).expectedSize(32).create();
synchronized (this) {
for (ObjectLongPair<int[]> p : frequency.keyValuesView()) {
mostExpensive.add(new Entry(p.getOne(), p.getTwo()));