From 3032a1e568d916257e39881b0fdd2fa988b903f8 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Fri, 4 Sep 2009 19:06:25 +0000 Subject: [PATCH] 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. --- src/java/com/samskivert/depot/PersistenceContext.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/java/com/samskivert/depot/PersistenceContext.java b/src/java/com/samskivert/depot/PersistenceContext.java index 1e6812f..371f0f1 100644 --- a/src/java/com/samskivert/depot/PersistenceContext.java +++ b/src/java/com/samskivert/depot/PersistenceContext.java @@ -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