question: public void testBug10630 ( ) throws Exception { Connection conn2 = null ; Statement stmt2 = null ; try { conn2 = getConnectionWithProps ( ( Properties ) null ) ; stmt2 = conn2 . createStatement ( ) ; conn2 . close ( ) ; stmt2 . getWarnings ( ) ; fail ( "Should've caught an exception here" ) ; } catch ( SQLException sqlEx ) { assertEquals ( SQLError . SQL_STATE_ILLEGAL_ARGUMENT , sqlEx . getSQLState ( ) ) ; } finally { if ( stmt2 != null ) { stmt2 . close ( ) ; } if ( conn2 != null ) { conn2 . close ( ) ; } } }
target:  Tests fix for BUG#10630, Statement.getWarnings() fails with NPE if statement has been closed.