mirror of
https://github.com/apache/lucene.git
synced 2025-03-03 14:59:16 +00:00
fix not-closing-on-exc bugs in BlockTreeTermsReader
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/slowclosing@1393550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a97703f1df
commit
c4a735490e
@ -172,12 +172,14 @@ public class BlockTreeTermsReader extends FieldsProducer {
|
||||
throw new CorruptIndexException("duplicate field: " + fieldInfo.name + " (resource=" + in + ")");
|
||||
}
|
||||
}
|
||||
if (indexDivisor != -1) {
|
||||
indexIn.close();
|
||||
}
|
||||
|
||||
success = true;
|
||||
} finally {
|
||||
if (!success) {
|
||||
IOUtils.closeWhileHandlingException(indexIn, this);
|
||||
} else if (indexDivisor != -1) {
|
||||
indexIn.close();
|
||||
IOUtils.closeWhileHandlingException(in, indexIn, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user