Skip to content

Commit 9efa947

Browse files
author
Vladimir Kotal
committed
move finishWriting() to the common finally block
fixes #3373
1 parent 8d493d9 commit 9efa947

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,17 +487,17 @@ public void update() throws IOException {
487487
reader.close();
488488
}
489489
}
490-
491-
try {
492-
finishWriting();
493-
} catch (IOException e) {
494-
finishingException = e;
495-
}
496490
} catch (RuntimeException ex) {
497491
LOGGER.log(Level.SEVERE,
498492
"Failed with unexpected RuntimeException", ex);
499493
throw ex;
500494
} finally {
495+
try {
496+
finishWriting();
497+
} catch (IOException e) {
498+
finishingException = e;
499+
}
500+
501501
completer = null;
502502
try {
503503
if (writer != null) {

0 commit comments

Comments
 (0)