Coverity suggested cleanup

This commit is contained in:
Jeremy Long
2017-07-23 06:27:14 -04:00
parent 176363492e
commit 12d74510cd
4 changed files with 6 additions and 26 deletions

View File

@@ -359,14 +359,8 @@ public class App {
* connection to the database could not be established
*/
private void runUpdateOnly() throws UpdateException, DatabaseException {
Engine engine = null;
try {
engine = new Engine();
try (Engine engine = new Engine()) {
engine.doUpdates();
} finally {
if (engine != null) {
engine.cleanup();
}
}
}