Fixed #361 Merge branch '2.3.x' into dev

pull/372/head
Brett Wooldridge 10 years ago
commit a31c2df6b7

@ -147,22 +147,16 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
return statement;
}
// **********************************************************************
// "Overridden" java.sql.Connection Methods
// **********************************************************************
/** {@inheritDoc} */
@Override
public final void close() throws SQLException
private final void closeOpenStatements()
{
if (delegate != ClosedConnection.CLOSED_CONNECTION) {
leakTask.cancel();
final int size = openStatements.size();
if (size > 0) {
for (int i = 0; i < size; i++) {
try {
openStatements.get(i).close();
final Statement statement = openStatements.get(i);
if (statement != null) {
statement.close();
}
}
catch (SQLException e) {
checkException(e);
@ -171,8 +165,22 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
openStatements.clear();
}
}
// **********************************************************************
// "Overridden" java.sql.Connection Methods
// **********************************************************************
/** {@inheritDoc} */
@Override
public final void close() throws SQLException
{
if (delegate != ClosedConnection.CLOSED_CONNECTION) {
leakTask.cancel();
try {
closeOpenStatements();
if (isCommitStateDirty) {
lastAccess = clockSource.currentTime();

Loading…
Cancel
Save