You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2020/01/20 10:27:16 UTC
[lucene-solr] branch branch_8x updated:
CompetitiveImpactAccumulator should protect its costly invariant checks
behind an `assert`.
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new b6a7f29 CompetitiveImpactAccumulator should protect its costly invariant checks behind an `assert`.
b6a7f29 is described below
commit b6a7f29b541021af13534755fe337a4ab1567b88
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Mon Jan 20 11:16:09 2020 +0100
CompetitiveImpactAccumulator should protect its costly invariant checks behind an `assert`.
---
.../java/org/apache/lucene/codecs/CompetitiveImpactAccumulator.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/CompetitiveImpactAccumulator.java b/lucene/core/src/java/org/apache/lucene/codecs/CompetitiveImpactAccumulator.java
index 5909602..fca6455 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/CompetitiveImpactAccumulator.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/CompetitiveImpactAccumulator.java
@@ -63,7 +63,7 @@ public final class CompetitiveImpactAccumulator {
public void clear() {
Arrays.fill(maxFreqs, 0);
otherFreqNormPairs.clear();
- assertConsistent();
+ assert assertConsistent();
}
/** Accumulate a (freq,norm) pair, updating this structure if there is no
@@ -75,7 +75,7 @@ public final class CompetitiveImpactAccumulator {
} else {
add(new Impact(freq, norm), otherFreqNormPairs);
}
- assertConsistent();
+ assert assertConsistent();
}
/** Merge {@code acc} into this. */
@@ -90,7 +90,7 @@ public final class CompetitiveImpactAccumulator {
add(entry, otherFreqNormPairs);
}
- assertConsistent();
+ assert assertConsistent();
}
/** Get the set of competitive freq and norm pairs, ordered by increasing freq and norm. */