lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r750162 - in /lucene/java/trunk/src/java/org/apache/lucene/index: IndexWriter.java MultiReader.java
Date Wed, 04 Mar 2009 21:34:53 GMT
Author: mikemccand
Date: Wed Mar  4 21:34:53 2009
New Revision: 750162

URL: http://svn.apache.org/viewvc?rev=750162&view=rev
Log:
LUCENE-1552: reset success to false in addIndexes(IndexReader[])

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

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=750162&r1=750161&r2=750162&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Wed Mar  4 21:34:53
2009
@@ -3414,6 +3414,8 @@
             sReader = SegmentReader.get(true, segmentInfos.info(0));
           }
         }
+        
+        success = false;
 
         try {
           if (sReader != null)
@@ -4458,8 +4460,6 @@
 
     merger = new SegmentMerger(this, mergedName, merge);
     
-    boolean success = false;
-
     // This is try/finally to make sure merger's readers are
     // closed:
     try {
@@ -4482,8 +4482,6 @@
 
       assert mergedDocCount == totDocCount;
 
-      success = true;
-
     } finally {
       // close readers before we attempt to delete
       // now-obsolete segments
@@ -4508,7 +4506,7 @@
         commit(size);
       }
       
-      success = false;
+      boolean success = false;
       final String compoundFileName = mergedName + "." + IndexFileNames.COMPOUND_FILE_EXTENSION;
 
       try {

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=750162&r1=750161&r2=750162&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 Wed Mar  4 21:34:53
2009
@@ -179,10 +179,8 @@
       }
       MultiReader mr = new MultiReader(newSubReaders);
       mr.decrefOnClose = newDecrefOnClose;
-      success = true;
       return mr;
     } else {
-      success = true;
       return this;
     }
   }



Mime
View raw message