From ebf46258704d3c5134a46ca566ddb61c9dc0d53e Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 1 Jul 2008 15:30:31 +0000 Subject: [PATCH] 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 --- src/java/org/apache/lucene/index/MultiReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/lucene/index/MultiReader.java b/src/java/org/apache/lucene/index/MultiReader.java index 0e94915d3d4..4a40ba5ba2d 100644 --- a/src/java/org/apache/lucene/index/MultiReader.java +++ b/src/java/org/apache/lucene/index/MultiReader.java @@ -67,7 +67,7 @@ public class MultiReader extends IndexReader { } private void initialize(IndexReader[] subReaders, boolean closeSubReaders) { - this.subReaders = subReaders; + this.subReaders = (IndexReader[]) subReaders.clone(); starts = new int[subReaders.length + 1]; // build starts array decrefOnClose = new boolean[subReaders.length]; for (int i = 0; i < subReaders.length; i++) {