Fix #346 handle closing (possible) ResultSet in a better way.

pull/355/head
Brett Wooldridge 10 years ago
parent 18320f2e4c
commit 9c7581d48d

@ -205,8 +205,8 @@ public final class PoolElf
try (Statement statement = connection.createStatement()) {
setQueryTimeout(statement, timeoutSec);
try (ResultSet rs = statement.executeQuery(config.getConnectionTestQuery())) {
/* auto close */
if (statement.execute(config.getConnectionTestQuery())) {
statement.getResultSet().close();
}
}

Loading…
Cancel
Save