SOLR-2092: fix off-by-one in assert

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@992410 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-09-03 18:41:10 +00:00
parent ccc91689b2
commit 495e614234
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);