You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ju...@apache.org on 2022/03/15 19:12:21 UTC
[lucene] branch branch_9_1 updated: LUCENE-10311: avoid division by zero on small sets.
This is an automated email from the ASF dual-hosted git repository.
julietibs pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9_1 by this push:
new ea989fe LUCENE-10311: avoid division by zero on small sets.
ea989fe is described below
commit ea989fe8f305040701527fe3cf9c68ed99dc9c42
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Wed Mar 9 11:41:01 2022 +0100
LUCENE-10311: avoid division by zero on small sets.
---
lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java b/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
index ec1b676..5566bd0 100644
--- a/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
+++ b/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
@@ -204,7 +204,7 @@ public final class FixedBitSet extends BitSet {
final int rangeLength = 16;
final int interval = 1024;
- if (numWords < interval) {
+ if (numWords <= interval) {
return cardinality();
}