Esempio n. 1
0
 private static void close(AutoCloseable closable) {
   try {
     if (closable != null) {
       closable.close();
       closable = null;
     }
   } catch (Exception sqle) {
     sqle.printStackTrace();
   }
 }
  /** {@inheritDoc} */
  @Override
  public void close() {
    Iterator<T> i;

    if ((i = iter) != null) {
      iter = null;

      if (i instanceof AutoCloseable) {
        try {
          ((AutoCloseable) i).close();
        } catch (Exception e) {
          throw new IgniteException(e);
        }
      }
    }
  }