mirror of https://github.com/apache/lucene.git
LUCENE-1552: reset success to false in addIndexes(IndexReader[])
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@750162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
480c2afd15
commit
cf28799cb0
|
@ -3414,6 +3414,8 @@ public class IndexWriter {
|
|||
sReader = SegmentReader.get(true, segmentInfos.info(0));
|
||||
}
|
||||
}
|
||||
|
||||
success = false;
|
||||
|
||||
try {
|
||||
if (sReader != null)
|
||||
|
@ -4458,8 +4460,6 @@ public class IndexWriter {
|
|||
|
||||
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 @@ public class IndexWriter {
|
|||
|
||||
assert mergedDocCount == totDocCount;
|
||||
|
||||
success = true;
|
||||
|
||||
} finally {
|
||||
// close readers before we attempt to delete
|
||||
// now-obsolete segments
|
||||
|
@ -4508,7 +4506,7 @@ public class IndexWriter {
|
|||
commit(size);
|
||||
}
|
||||
|
||||
success = false;
|
||||
boolean success = false;
|
||||
final String compoundFileName = mergedName + "." + IndexFileNames.COMPOUND_FILE_EXTENSION;
|
||||
|
||||
try {
|
||||
|
|
|
@ -179,10 +179,8 @@ public class MultiReader extends IndexReader implements Cloneable {
|
|||
}
|
||||
MultiReader mr = new MultiReader(newSubReaders);
|
||||
mr.decrefOnClose = newDecrefOnClose;
|
||||
success = true;
|
||||
return mr;
|
||||
} else {
|
||||
success = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue