protected void checkCompletion() throws SQLException
{
if (!closeOnCompletion)
return;
ResultWrapper result = firstUnclosedResult;
while (result != null)
{
if (result.getResultSet() != null && !result.getResultSet().isClosed())
{
return;
}
result = result.getNext();
}
// prevent all ResultSet.close arising from Statement.close to loop here
closeOnCompletion = false;
try