Commit e9d0574918706c4121851ee1eb5d3817cf117ac3
Committed by
GitHub
Merge pull request #3456 from ShvaykaD/fix/ttlCleanUpServices
[2.5.5] added autoclose resultSet to TTL cleanUp Service
Showing
1 changed file
with
1 additions
and
2 deletions
... | ... | @@ -39,8 +39,7 @@ public abstract class AbstractCleanUpService { |
39 | 39 | protected String dbPassword; |
40 | 40 | |
41 | 41 | protected long executeQuery(Connection conn, String query) throws SQLException { |
42 | - try (Statement statement = conn.createStatement()) { | |
43 | - ResultSet resultSet = statement.executeQuery(query); | |
42 | + try (Statement statement = conn.createStatement(); ResultSet resultSet = statement.executeQuery(query)) { | |
44 | 43 | if (log.isDebugEnabled()) { |
45 | 44 | getWarnings(statement); |
46 | 45 | } | ... | ... |