Browse Source
Merge pull request #3456 from ShvaykaD/fix/ttlCleanUpServices
[2.5.5] added autoclose resultSet to TTL cleanUp Service
pull/3512/head
Igor Kulikov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/service/ttl/AbstractCleanUpService.java
|
|
|
@ -39,8 +39,7 @@ public abstract class AbstractCleanUpService { |
|
|
|
protected String dbPassword; |
|
|
|
|
|
|
|
protected long executeQuery(Connection conn, String query) throws SQLException { |
|
|
|
try (Statement statement = conn.createStatement()) { |
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
try (Statement statement = conn.createStatement(); ResultSet resultSet = statement.executeQuery(query)) { |
|
|
|
if (log.isDebugEnabled()) { |
|
|
|
getWarnings(statement); |
|
|
|
} |
|
|
|
|