From 688633f95faa52515b090ff00440b1eebdaad7d9 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Fri, 24 Apr 2015 07:53:53 +0000
Subject: [PATCH] OPENDJ-1934 UI: Create/Update indexes
---
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
index bd9fd06..3a5e079 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
+++ b/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);
+ }
+ }
+
}
--
Gitblit v1.10.0