Connection.isClosed() is new in 1.6 and Connection.close() is a no-op if the connection is already closed, so let's go for brevity here and save people from having to have 1.6-specific JDBC drivers.
This commit is contained in:
@@ -560,9 +560,7 @@ public class PersistenceContext
|
||||
// close all opened statements; if any close fails, abort the close process as
|
||||
// the whole connection is now unusable and will be discarded
|
||||
for (Statement stmt : stmts) {
|
||||
if (!stmt.isClosed()) {
|
||||
stmt.close();
|
||||
}
|
||||
stmt.close();
|
||||
}
|
||||
}
|
||||
// if auto-commit is off and this is a write operation, push it through
|
||||
|
||||
Reference in New Issue
Block a user