code: public static void closeResultSet(ResultSet resultSet, String sql) {
  		if (resultSet != null) {
  			try {
  				resultSet.close();
  			} catch (SQLException e) {
  				log.log(Level.WARNING, "Failed to close SQL ResultSet: " + sql,
  						e);
  			}
  		}
  	}
docs: Close the ResultSet
  
  @param resultSet
  result set
  @param sql
  sql statement