1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-06 22:56:41 +02:00

Prevent closing already closed statements

This commit is contained in:
snowleo
2011-08-08 15:56:23 +02:00
parent fd67d5254d
commit 9c2af4adbf

View File

@@ -75,9 +75,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
@@ -116,9 +119,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
@@ -194,9 +200,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
@@ -240,9 +249,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
@@ -295,9 +307,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
@@ -355,9 +370,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
@@ -397,9 +415,12 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock
if (ps != null)
{
try
{
if (!ps.isClosed())
{
ps.close();
}
}
catch (SQLException ex)
{
LOGGER.log(Level.SEVERE, null, ex);