rs close and statement close are not null safe if (sql!=null) {
Statement statement = null; ResultSet rs = null; try { statement = connection.createStatement(); rs = statement.executeQuery(sql);
while ( rs.next() ) { sequences.add( rs.getString(1).toLowerCase().trim() ); }
} finally { rs.close(); statement.close(); }
|