mirror of https://github.com/apache/lucene.git
LUCENE-750: fix one case that was not closing an IndexOutput with a try/finally
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@488716 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7c4b667f71
commit
19ba76b0d4
|
@ -260,10 +260,13 @@ public final class SegmentInfos extends Vector {
|
|||
|
||||
try {
|
||||
output = directory.createOutput(IndexFileNames.SEGMENTS_GEN);
|
||||
output.writeInt(FORMAT_LOCKLESS);
|
||||
output.writeLong(generation);
|
||||
output.writeLong(generation);
|
||||
output.close();
|
||||
try {
|
||||
output.writeInt(FORMAT_LOCKLESS);
|
||||
output.writeLong(generation);
|
||||
output.writeLong(generation);
|
||||
} finally {
|
||||
output.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// It's OK if we fail to write this file since it's
|
||||
// used only as one of the retry fallbacks.
|
||||
|
|
Loading…
Reference in New Issue