Cleanup resources

This commit is contained in:
GeorgH93 2017-11-13 21:22:56 +01:00 committed by GitHub
parent 520c54c909
commit eabff6dc2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,9 +61,9 @@ public SQL(MinePacks mp)
// Delete old backpacks // Delete old backpacks
if(maxAge > 0) if(maxAge > 0)
{ {
try try(Connection connection = getConnection(); Statement statement = connection.createStatement())
{ {
getConnection().createStatement().execute(queryDeleteOldBackpacks); statement.execute(queryDeleteOldBackpacks);
} }
catch(SQLException e) catch(SQLException e)
{ {
@ -409,4 +409,4 @@ public Backpack loadBackpack(OfflinePlayer player) // The sync function shouldn'
} }
return null; return null;
} }
} }