question: 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" ) ; }
target:  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. (?)