SortingAtomicReader did not grow the arrays consistently

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1454833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2013-03-10 11:21:05 +00:00
parent 389bed49f8
commit cf803eaf92
1 changed files with 2 additions and 2 deletions

View File

@ -447,8 +447,8 @@ public class SortingAtomicReader extends FilterAtomicReader {
int i = 0;
while ((doc = in.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (i == docs.length) {
docs = ArrayUtil.grow(docs, i + 1);
offsets = ArrayUtil.grow(offsets, i + 1);
docs = ArrayUtil.grow(docs, docs.length + 1);
offsets = ArrayUtil.grow(offsets, offsets.length + 1);
}
docs[i] = old2new[doc];
offsets[i] = out.getFilePointer();