Skip to main content
aboutsummaryrefslogtreecommitdiffstats
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.director/src/org/eclipse/equinox/internal
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.director/src/org/eclipse/equinox/internal')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OptimizationFunction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java7
3 files changed, 13 insertions, 12 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OptimizationFunction.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OptimizationFunction.java
index 7a425bce8..a439c0d8d 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OptimizationFunction.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OptimizationFunction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 Rapicorp Inc. and others.
+ * Copyright (c) 2013, 2018 Rapicorp 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
@@ -43,11 +43,11 @@ public class OptimizationFunction {
Set<IInstallableUnit> transitiveClosure; //The transitive closure of the IUs we are adding (this also means updating)
if (newRoots.isEmpty()) {
- transitiveClosure = Collections.<IInstallableUnit> emptySet();
+ transitiveClosure = Collections.emptySet();
} else {
IQueryable<IInstallableUnit> queryable = new Slicer(picker, selectionContext, false).slice(newRoots.toArray(new IInstallableUnit[newRoots.size()]), new NullProgressMonitor());
if (queryable == null) {
- transitiveClosure = Collections.<IInstallableUnit> emptySet();
+ transitiveClosure = Collections.emptySet();
} else {
transitiveClosure = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).toSet();
}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
index 31e62a98e..5fb9b4a4b 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 IBM Corporation 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
@@ -153,14 +153,14 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
@Override
public Collection<IInstallableUnit> getRemovals() {
if (iusToRemove == null)
- return Collections.<IInstallableUnit> emptyList();
+ return Collections.emptyList();
return Collections.unmodifiableList(iusToRemove);
}
@Override
public Collection<IInstallableUnit> getAdditions() {
if (iusToAdd == null)
- return Collections.<IInstallableUnit> emptyList();
+ return Collections.emptyList();
return Collections.unmodifiableList(iusToAdd);
}
@@ -174,14 +174,14 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
// map of key value pairs
public Map<String, String> getPropertiesToAdd() {
if (propertiesToAdd == null)
- return Collections.<String, String> emptyMap();
+ return Collections.emptyMap();
return propertiesToAdd;
}
// map of iu->list of property keys to be removed for an iu
public Map<IInstallableUnit, List<String>> getInstallableUnitProfilePropertiesToRemove() {
if (iuPropertiesToRemove == null)
- return Collections.<IInstallableUnit, List<String>> emptyMap();
+ return Collections.emptyMap();
return iuPropertiesToRemove;
}
@@ -189,7 +189,7 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
// map iu->map of key->value pairs for properties to be added for an iu
public Map<IInstallableUnit, Map<String, String>> getInstallableUnitProfilePropertiesToAdd() {
if (iuPropertiesToAdd == null)
- return Collections.<IInstallableUnit, Map<String, String>> emptyMap();
+ return Collections.emptyMap();
return iuPropertiesToAdd;
}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
index 914c06d0a..937a1d615 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
@@ -1,5 +1,6 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2018 IBM Corporation 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 http://www.eclipse.org/legal/epl-v10.html
@@ -150,7 +151,7 @@ public class Projector {
} finally {
//must never have a null result, because caller is waiting on result to be non-null
if (explanation == null)
- explanation = Collections.<Explanation> emptySet();
+ explanation = Collections.emptySet();
}
synchronized (this) {
ExplanationJob.this.notify();
@@ -815,7 +816,7 @@ public class Projector {
IRequirement req = patch.getLifeCycle();
if (req == null)
return;
- expandRequirement(req, iu, Collections.<AbstractVariable> emptyList(), isRootIu);
+ expandRequirement(req, iu, Collections.emptyList(), isRootIu);
}
private void missingRequirement(IInstallableUnit iu, IRequirement req) throws ContradictionException {

Back to the top