You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2010/09/03 20:41:10 UTC
svn commit: r992410 - in
/lucene/dev/trunk/solr/src/java/org/apache/solr/request: SimpleFacets.java
UnInvertedField.java
Author: yonik
Date: Fri Sep 3 18:41:10 2010
New Revision: 992410
URL: http://svn.apache.org/viewvc?rev=992410&view=rev
Log:
SOLR-2092: fix off-by-one in assert
Modified:
lucene/dev/trunk/solr/src/java/org/apache/solr/request/SimpleFacets.java
lucene/dev/trunk/solr/src/java/org/apache/solr/request/UnInvertedField.java
Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/request/SimpleFacets.java?rev=992410&r1=992409&r2=992410&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/request/SimpleFacets.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/request/SimpleFacets.java Fri Sep 3 18:41:10 2010
@@ -508,7 +508,7 @@ public class SimpleFacets {
// if we are deep paging, we don't have to order the highest "offset" counts.
int collectCount = Math.max(0, queue.size() - off);
- assert collectCount < lim;
+ assert collectCount <= lim;
// the start and end indexes of our list "sorted" (starting with the highest value)
int sortedIdxStart = queue.size() - (collectCount - 1);
Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/request/UnInvertedField.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/request/UnInvertedField.java?rev=992410&r1=992409&r2=992410&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/request/UnInvertedField.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/request/UnInvertedField.java Fri Sep 3 18:41:10 2010
@@ -599,7 +599,7 @@ public class UnInvertedField {
// if we are deep paging, we don't have to order the highest "offset" counts.
int collectCount = Math.max(0, queue.size() - off);
- assert collectCount < lim;
+ assert collectCount <= lim;
// the start and end indexes of our list "sorted" (starting with the highest value)
int sortedIdxStart = queue.size() - (collectCount - 1);