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 | 9c2af4adbfa171ddc55bb60a497f37e8f96aab03 (patch) | |
tree | 333bfc3e1a2812888fa58ecb41c093a3eb0d18b1 /EssentialsProtect/src/com/earth2me/essentials | |
parent | fd67d5254deae16ef1a505f1a9e894df23321863 (diff) | |
download | Essentials-9c2af4adbfa171ddc55bb60a497f37e8f96aab03.tar Essentials-9c2af4adbfa171ddc55bb60a497f37e8f96aab03.tar.gz Essentials-9c2af4adbfa171ddc55bb60a497f37e8f96aab03.tar.lz Essentials-9c2af4adbfa171ddc55bb60a497f37e8f96aab03.tar.xz Essentials-9c2af4adbfa171ddc55bb60a497f37e8f96aab03.zip |
Prevent closing already closed statements
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials')
-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) { |