From 754b6fe22c8138460bd93f2b0c9d725c627163c4 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 29 Oct 2014 16:33:54 +0000
Subject: [PATCH] OPENDJ-1571 Internal Error when doing REST operations on HTTP Connection Handler
---
opends/src/server/org/opends/server/util/CollectionUtils.java | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/CollectionUtils.java b/opends/src/server/org/opends/server/util/CollectionUtils.java
index 175be36..6b2c938 100644
--- a/opends/src/server/org/opends/server/util/CollectionUtils.java
+++ b/opends/src/server/org/opends/server/util/CollectionUtils.java
@@ -66,6 +66,20 @@
}
/**
+ * Creates a new {@link List} with the provided elements.
+ *
+ * @param <E>
+ * the elements' type
+ * @param elements
+ * the elements to add to the new List
+ * @return a new ArrayList with the provided elements
+ */
+ public static <E> List<E> newList(E... elements)
+ {
+ return newArrayList(elements);
+ }
+
+ /**
* Creates a new {@link HashSet} with the provided elements.
*
* @param <E>
@@ -106,4 +120,32 @@
{
return new TreeSet<E>(Arrays.asList(elements));
}
+
+ /**
+ * Creates a new {@link SortedSet} with the provided elements.
+ *
+ * @param <E>
+ * the elements' type
+ * @param elements
+ * the elements to add to the new SortedSet
+ * @return a new TreeSet with the provided elements
+ */
+ public static <E> SortedSet<E> newSortedSet(E... elements)
+ {
+ return newTreeSet(elements);
+ }
+
+ /**
+ * Creates a new {@link Set} with the provided elements.
+ *
+ * @param <E>
+ * the elements' type
+ * @param elements
+ * the elements to add to the new Set
+ * @return a new TreeSet with the provided elements
+ */
+ public static <E> Set<E> newSet(E... elements)
+ {
+ return newHashSet(elements);
+ }
}
--
Gitblit v1.10.0