Skip to content

Commit d0d6ef1

Browse files
always abort connections do not ask if connection is closed
1 parent bfe8f19 commit d0d6ef1

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

sqldev/src/main/java/org/utplsql/sqldev/model/DatabaseTools.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,8 @@ public static String createTemporaryOrPrivateConnection(String connectionName) {
104104
}
105105
}
106106

107-
public static boolean isConnectionClosed(Connection conn) {
108-
try {
109-
return conn.isClosed();
110-
} catch (SQLException e) {
111-
throw new GenericDatabaseAccessException("Error getting status of connection.", e);
112-
}
113-
}
114-
115107
public static void closeConnection(Connection conn) {
116-
if (!isConnectionClosed(conn)) {
117-
try {
118-
conn.close();
119-
} catch (SQLException e) {
120-
throw new GenericDatabaseAccessException("Could not close connection.");
121-
}
122-
}
108+
abortConnection(conn);
123109
}
124110

125111
public static void abortConnection(Connection conn) {

0 commit comments

Comments
 (0)