Prevent closing already closed statements

This commit is contained in:
snowleo 2011-08-08 15:56:23 +02:00
parent 62ebf3db41
commit b9fc6a0b2b

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);