LUCENE-1323: fix MultiReader to make a private copy of the subReaders array

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@673103 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2008-07-01 15:30:31 +00:00
parent 4f7ead8112
commit ebf4625870
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ public class MultiReader extends IndexReader {
} }
private void initialize(IndexReader[] subReaders, boolean closeSubReaders) { private void initialize(IndexReader[] subReaders, boolean closeSubReaders) {
this.subReaders = subReaders; this.subReaders = (IndexReader[]) subReaders.clone();
starts = new int[subReaders.length + 1]; // build starts array starts = new int[subReaders.length + 1]; // build starts array
decrefOnClose = new boolean[subReaders.length]; decrefOnClose = new boolean[subReaders.length];
for (int i = 0; i < subReaders.length; i++) { for (int i = 0; i < subReaders.length; i++) {