code: public static void closeResultSet(ResultSet resultSet)
          throws InternalErrorException {
  
          if (resultSet != null) {
              try {
                  resultSet.close();
              } catch (SQLException e) {
                  throw new InternalErrorException(e);
              }
          }
  
      }
docs: It closes a <code>ResultSet</code> if not <code>null</code>.