Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-03-02 10:32:15 +0000
committerAlexander Kurtakov2018-03-02 10:57:36 +0000
commitf032752bc00b63edf0e8fd418f2798ce5cb774e5 (patch)
tree82d1cffd138da31a22ec1b515b94858e68ee7aff /bundles/org.eclipse.equinox.p2.core
parent98a3c2b3358c56689d75038a8ed860571f4cf0b2 (diff)
downloadrt.equinox.p2-f032752bc00b63edf0e8fd418f2798ce5cb774e5.tar.gz
rt.equinox.p2-f032752bc00b63edf0e8fd418f2798ce5cb774e5.tar.xz
rt.equinox.p2-f032752bc00b63edf0e8fd418f2798ce5cb774e5.zip
Bug 531917 - Remove redundant type parameters
With Java 8 and properly generified some apis it's not needed to specify the types anymore. Change-Id: Ib758c6f50b1b1fd3f56bd52eb7e664b89b6cc776 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core')
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java6
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

Back to the top