Fix statement not being closed

This commit is contained in:
Rsl1122 2017-08-16 16:32:37 +03:00
parent e3333fabb8
commit bd96d09b74

View File

@ -150,7 +150,10 @@ public abstract class SQLDB extends Database {
if (!newDatabase && getVersion() < 8) {
setVersion(8);
}
connection.prepareStatement("DROP TABLE IF EXISTS plan_locations").execute();
try (Statement statement = connection.createStatement()) {
statement.execute("DROP TABLE IF EXISTS plan_locations");
}
}
return true;
}