mirror of https://github.com/apache/lucene.git
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:
parent
389bed49f8
commit
cf803eaf92
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue