Commit 8bdbda914eb18ec66d64a714d3b8899d7872e778
1 parent
d5146b0d
added resultSet to try with resources
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 | } | ... | ... |