Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
Expand Down Expand Up @@ -60,7 +61,15 @@ String cacheKey() {
* reuse the PreparedStatement.
*/
void closeDestroy() throws SQLException {
delegate.close();
if (!delegate.isClosed()) {
// Cancel might throw an exception when it is already closed
try {
delegate.cancel();
} catch (SQLFeatureNotSupportedException e) {
Log.trace("Canceling statement not supported by JDBC-driver");
}
delegate.close();
}
}

/**
Expand Down