mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
19.11.2013 bc247971096268630f67130974fccbb3a6e23be5
opends/src/server/org/opends/server/util/StaticUtils.java
@@ -4639,6 +4639,33 @@
  }
  /**
   * Closes the provided {@link Selector}'s ignoring any errors which occurred.
   * <p>
   * With java 7 we will be able to use {@link StaticUtils#close(Closeable...)}
   * </p>
   *
   * @param selectors
   *          The selectors to be closed, which may be <code>null</code>.
   */
  public static void close(Selector... selectors)
  {
    for (Selector selector : selectors)
    {
      if (selector != null)
      {
        try
        {
          selector.close();
        }
        catch (IOException ignored)
        {
          // Ignore.
        }
      }
    }
  }
  /**
   * Returns an {@link Iterable} returning the passed in {@link Iterator}. THis
   * allows using methods returning Iterators with foreach statements.
   * <p>