mirror of https://github.com/apache/lucene.git
LUCENE-2135: don't flush field cache if we hit exception during init (it leads to NPE)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@890439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c67b43ef34
commit
86039cdb36
|
@ -106,7 +106,6 @@ public class SegmentReader extends IndexReader implements Cloneable {
|
|||
segment = si.name;
|
||||
this.readBufferSize = readBufferSize;
|
||||
this.dir = dir;
|
||||
this.origInstance = origInstance;
|
||||
|
||||
boolean success = false;
|
||||
|
||||
|
@ -144,6 +143,12 @@ public class SegmentReader extends IndexReader implements Cloneable {
|
|||
decRef();
|
||||
}
|
||||
}
|
||||
|
||||
// Must assign this at the end -- if we hit an
|
||||
// exception above core, we don't want to attempt to
|
||||
// purge the FieldCache (will hit NPE because core is
|
||||
// not assigned yet).
|
||||
this.origInstance = origInstance;
|
||||
}
|
||||
|
||||
synchronized TermVectorsReader getTermVectorsReaderOrig() {
|
||||
|
|
Loading…
Reference in New Issue