added resultSet to try with resources

This commit is contained in:
dshvaika 2020-09-14 11:25:28 +03:00
parent d5146b0d92
commit 8bdbda914e

View File

@ -39,8 +39,7 @@ public abstract class AbstractCleanUpService {
protected String dbPassword; protected String dbPassword;
protected long executeQuery(Connection conn, String query) throws SQLException { protected long executeQuery(Connection conn, String query) throws SQLException {
try (Statement statement = conn.createStatement()) { try (Statement statement = conn.createStatement(); ResultSet resultSet = statement.executeQuery(query)) {
ResultSet resultSet = statement.executeQuery(query);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
getWarnings(statement); getWarnings(statement);
} }