From f032752bc00b63edf0e8fd418f2798ce5cb774e5 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Fri, 2 Mar 2018 12:32:15 +0200 Subject: 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 --- .../equinox/internal/p2/director/OptimizationFunction.java | 6 +++--- .../equinox/internal/p2/director/ProfileChangeRequest.java | 12 ++++++------ .../org/eclipse/equinox/internal/p2/director/Projector.java | 7 ++++--- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'bundles/org.eclipse.equinox.p2.director/src') 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 transitiveClosure; //The transitive closure of the IUs we are adding (this also means updating) if (newRoots.isEmpty()) { - transitiveClosure = Collections. emptySet(); + transitiveClosure = Collections.emptySet(); } else { IQueryable queryable = new Slicer(picker, selectionContext, false).slice(newRoots.toArray(new IInstallableUnit[newRoots.size()]), new NullProgressMonitor()); if (queryable == null) { - transitiveClosure = Collections. 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 getRemovals() { if (iusToRemove == null) - return Collections. emptyList(); + return Collections.emptyList(); return Collections.unmodifiableList(iusToRemove); } @Override public Collection getAdditions() { if (iusToAdd == null) - return Collections. 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 getPropertiesToAdd() { if (propertiesToAdd == null) - return Collections. emptyMap(); + return Collections.emptyMap(); return propertiesToAdd; } // map of iu->list of property keys to be removed for an iu public Map> getInstallableUnitProfilePropertiesToRemove() { if (iuPropertiesToRemove == null) - return Collections.> 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> getInstallableUnitProfilePropertiesToAdd() { if (iuPropertiesToAdd == null) - return Collections.> 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. 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. emptyList(), isRootIu); + expandRequirement(req, iu, Collections.emptyList(), isRootIu); } private void missingRequirement(IInstallableUnit iu, IRequirement req) throws ContradictionException { -- cgit v1.2.3