diff options
author | snowleo <schneeleo@gmail.com> | 2011-08-08 15:56:23 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-08-08 15:56:23 +0200 |
commit | b9fc6a0b2bd89d7dcd5b97540a03353a096b55bd (patch) | |
tree | 37b336424810d175010c80c1c4eb62dd34ea9623 /EssentialsProtect/src | |
parent | 62ebf3db41418ba5e00806ea3aa45e2639b04a8d (diff) | |
download | Essentials-b9fc6a0b2bd89d7dcd5b97540a03353a096b55bd.tar Essentials-b9fc6a0b2bd89d7dcd5b97540a03353a096b55bd.tar.gz Essentials-b9fc6a0b2bd89d7dcd5b97540a03353a096b55bd.tar.lz Essentials-b9fc6a0b2bd89d7dcd5b97540a03353a096b55bd.tar.xz Essentials-b9fc6a0b2bd89d7dcd5b97540a03353a096b55bd.zip |
Prevent closing already closed statements
Diffstat (limited to 'EssentialsProtect/src')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java index e24a71b80..afbcedb72 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java @@ -76,7 +76,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { @@ -117,7 +120,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { @@ -195,7 +201,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { @@ -241,7 +250,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { @@ -296,7 +308,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { @@ -356,7 +371,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { @@ -398,7 +416,10 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock { try { - ps.close(); + if (!ps.isClosed()) + { + ps.close(); + } } catch (SQLException ex) { |