diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core')
2 files changed, 6 insertions, 6 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 017d4d5de..bfb44ef4f 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2017 Cloudsmith Inc. and others. + * Copyright (c) 2009, 2018 Cloudsmith Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -191,7 +191,7 @@ public class CollectionUtils { * @return The unmodifiable list */ public static <T> List<T> unmodifiableList(T[] array) { - return array == null || array.length == 0 ? Collections.<T> emptyList() : new UnmodifiableArrayList<>(array); + return array == null || array.length == 0 ? Collections.emptyList() : new UnmodifiableArrayList<>(array); } /** @@ -214,7 +214,7 @@ public class CollectionUtils { */ public static Map<String, String> toMap(Properties properties) { if (properties == null || properties.isEmpty()) - return Collections.<String, String> emptyMap(); + return Collections.emptyMap(); Map<String, String> props = new HashMap<>(properties.size()); putAll(properties, props); diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java index 6f5a020e2..f41cc5ce5 100644 --- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java +++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java @@ -106,7 +106,7 @@ public class OrderedProperties extends Dictionary<String, String> implements Map @Override public Set<Map.Entry<String, String>> entrySet() { - return propertyMap != null ? propertyMap.entrySet() : Collections.<Map.Entry<String, String>> emptySet(); + return propertyMap != null ? propertyMap.entrySet() : Collections.emptySet(); } @Override @@ -116,7 +116,7 @@ public class OrderedProperties extends Dictionary<String, String> implements Map @Override public Set<String> keySet() { - return propertyMap != null ? propertyMap.keySet() : Collections.<String> emptySet(); + return propertyMap != null ? propertyMap.keySet() : Collections.emptySet(); } @Override @@ -132,7 +132,7 @@ public class OrderedProperties extends Dictionary<String, String> implements Map @Override public Collection<String> values() { - return propertyMap != null ? propertyMap.values() : Collections.<String> emptyList(); + return propertyMap != null ? propertyMap.values() : Collections.emptyList(); } @Override |