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

Gaetan Boismal
24.53.2015 688633f95faa52515b090ff00440b1eebdaad7d9
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
@@ -2891,4 +2891,23 @@
    return null;
  }
  /**
   * Throw the first exception of the list (if any).
   *
   * @param <E>
   *          The exception type
   * @param exceptions
   *          A list of exceptions.
   * @throws E
   *           The first element of the provided list (if the list is not
   *           empty).
   */
  public static <E extends Exception> void throwFirstFrom(List<? extends E> exceptions) throws E
  {
    if (!exceptions.isEmpty())
    {
      throw exceptions.get(0);
    }
  }
}