private static synchronized void cleanup(Statement S,ResultSet R){
  logger.trace("cleanup() -->entry");
  Connection C=null;
  if (R != null) {
    logger.trace("cleanup() --> ResultSet.close()");
    try {
      R.close();
    }
 catch (    Throwable t) {
      surfaceThrowable("cleanup() called ResultSet.close()",t);
    }
  }
  if (S != null) {
    try {
      C=S.getConnection();
    }
 catch (    Throwable t) {
      surfaceThrowable("cleanup() called Statement.getConnection()",t);
    }
    logger.trace("cleanup() --> Statement.close()");
    try {
      S.close();
    }
 catch (    Throwable t) {
      surfaceThrowable("cleanup() called Statement.close()",t);
    }
  }
  if (C != null) {
    logger.trace("cleanup() --> Connection.close()");
    try {
      C.close();
    }
 catch (    Throwable t) {
      surfaceThrowable("cleanup() called Connection.close()",t);
    }
  }
  logger.trace("cleanup() <--exit");
}

private static synchronized void cleanup ( Statement S , ResultSet R ) { logger . trace ( "cleanup() -->entry" ) ; Connection C = null ; if ( R != null ) { logger . trace ( "cleanup() --> ResultSet.close()" ) ; try { R . close ( ) ; } catch ( Throwable t ) { surfaceThrowable ( "cleanup() called ResultSet.close()" , t ) ; } } if ( S != null ) { try { C = S . getConnection ( ) ; } catch ( Throwable t ) { surfaceThrowable ( "cleanup() called Statement.getConnection()" , t ) ; } logger . trace ( "cleanup() --> Statement.close()" ) ; try { S . close ( ) ; } catch ( Throwable t ) { surfaceThrowable ( "cleanup() called Statement.close()" , t ) ; } } if ( C != null ) { logger . trace ( "cleanup() --> Connection.close()" ) ; try { C . close ( ) ; } catch ( Throwable t ) { surfaceThrowable ( "cleanup() called Connection.close()" , t ) ; } } logger . trace ( "cleanup() <--exit" ) ; }
close the input jdbc resultset , statement , and connection objects , as appropriate . any error ( s ) in close processing is surfaced , but this seems to be about all that can be done . ( ? )
