Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java38
1 files changed, 2 insertions, 36 deletions
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
index 5bea8c961..edbf40ab5 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
@@ -166,47 +166,13 @@ public class CollectionUtils {
}
/**
- * The emptyList() method was introduced in Java 1.5 so we need this here to be able to
- * down compile to 1.4.
- * @param <T> The type of the elements
- * @return An empty list
- */
- @SuppressWarnings("unchecked")
- public static <T> List<T> emptyList() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * The emptySet() method was introduced in Java 1.5 so we need this here to be able to
- * down compile to 1.4.
- * @param <T> The type of the elements
- * @return An empty set
- */
- @SuppressWarnings("unchecked")
- public static <T> Set<T> emptySet() {
- return Collections.EMPTY_SET;
- }
-
- /**
- * The emptyMap() method was introduced in Java 1.5 so we need this here to be able to
- * down compile to 1.4.
- * @param <K> The type of the map keys
- * @param <V> The type of the map values
- * @return An empty set
- */
- @SuppressWarnings("unchecked")
- public static <K, V> Map<K, V> emptyMap() {
- return Collections.EMPTY_MAP;
- }
-
- /**
* Returns an unmodifiable list that is backed by the <code>array</code>.
* @param <T> The list element type
* @param array The array of elements
* @return The unmodifiable list
*/
public static <T> List<T> unmodifiableList(T[] array) {
- return array == null || array.length == 0 ? CollectionUtils.<T> emptyList() : new UnmodifiableArrayList<T>(array);
+ return array == null || array.length == 0 ? Collections.<T> emptyList() : new UnmodifiableArrayList<T>(array);
}
/**
@@ -229,7 +195,7 @@ public class CollectionUtils {
*/
public static Map<String, String> toMap(Properties properties) {
if (properties == null || properties.isEmpty())
- return emptyMap();
+ return Collections.<String, String> emptyMap();
Map<String, String> props = new HashMap<String, String>(properties.size());
putAll(properties, props);

Back to the top