lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r673103 - /lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java
Date Tue, 01 Jul 2008 15:30:31 GMT
Author: mikemccand
Date: Tue Jul  1 08:30:31 2008
New Revision: 673103

URL: http://svn.apache.org/viewvc?rev=673103&view=rev
Log:
LUCENE-1323: fix MultiReader to make a private copy of the subReaders array

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java?rev=673103&r1=673102&r2=673103&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java Tue Jul  1 08:30:31
2008
@@ -67,7 +67,7 @@
   }
   
   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++) {



Mime
View raw message