Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-03-02 05:32:15 -0500
committerAlexander Kurtakov2018-03-02 05:57:36 -0500
commitf032752bc00b63edf0e8fd418f2798ce5cb774e5 (patch)
tree82d1cffd138da31a22ec1b515b94858e68ee7aff /bundles/org.eclipse.equinox.p2.engine/src
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.engine/src')
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java8
7 files changed, 17 insertions, 17 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
index da6846d26..0c80ca454 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
@@ -113,7 +113,7 @@ public abstract class InstallableUnitPhase extends Phase {
Collection<ITouchpointData> data = unit.getTouchpointData();
int dataSize = data.size();
if (dataSize == 0)
- return Collections.<ITouchpointInstruction> emptyList();
+ return Collections.emptyList();
ArrayList<ITouchpointInstruction> matches = new ArrayList<>(dataSize);
for (ITouchpointData td : data) {
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
index 5aae66b40..33c62d22f 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2017 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -49,7 +49,7 @@ public class InstructionParser {
private Map<String, ActionEntry> parseImportAttribute(String importAttribute) {
if (importAttribute == null)
- return Collections.<String, ActionEntry> emptyMap();
+ return Collections.emptyMap();
Map<String, ActionEntry> result = new HashMap<>();
StringTokenizer tokenizer = new StringTokenizer(importAttribute, ","); //$NON-NLS-1$
@@ -82,7 +82,7 @@ public class InstructionParser {
String nameValuePairs = statement.substring(openBracket + 1, closeBracket);
if (nameValuePairs.length() == 0)
- return new ParameterizedProvisioningAction(action, Collections.<String, String> emptyMap(), statement);
+ return new ParameterizedProvisioningAction(action, Collections.emptyMap(), statement);
StringTokenizer tokenizer = new StringTokenizer(nameValuePairs, ","); //$NON-NLS-1$
Map<String, String> parameters = new HashMap<>();
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
index c477a8493..1220578ad 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * 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
@@ -135,7 +135,7 @@ public class Profile extends IndexProvider<IInstallableUnit> implements IProfile
public List<String> getSubProfileIds() {
if (subProfileIds == null)
- return Collections.<String> emptyList();
+ return Collections.emptyList();
return Collections.unmodifiableList(subProfileIds);
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
index 85708904f..f0ce7d0c0 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
@@ -85,7 +85,7 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
IQueryResult<IInstallableUnit> allIUs = sharedProfile.query(QueryUtil.createIUAnyQuery(), null);
for (Iterator<IInstallableUnit> iterator = allIUs.iterator(); iterator.hasNext();) {
IInstallableUnit iu = iterator.next();
- IMatchExpression<IInstallableUnit> iuMatcher = ExpressionUtil.getFactory().<IInstallableUnit> matchExpression(ExpressionUtil.parse("id == $0 && version == $1"), iu.getId(), iu.getVersion()); //$NON-NLS-1$
+ IMatchExpression<IInstallableUnit> iuMatcher = ExpressionUtil.getFactory().matchExpression(ExpressionUtil.parse("id == $0 && version == $1"), iu.getId(), iu.getVersion()); //$NON-NLS-1$
iuRequirements.add(MetadataFactory.createRequirement(iuMatcher, null, 0, 1, true));
}
iuDescription.addRequirements(iuRequirements);
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
index 2fb4d8d7b..a49f52b81 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.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
@@ -147,15 +147,15 @@ public class Property extends Phase {
@Override
protected List<ProvisioningAction> getActions(Operand operand) {
if (operand instanceof PropertyOperand)
- return Collections.<ProvisioningAction> singletonList(new ProfilePropertyAction());
+ return Collections.singletonList(new ProfilePropertyAction());
if (operand instanceof InstallableUnitOperand) {
InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
if (iuOperand.first() != null) {
if (iuOperand.second() != null) {
- return Collections.<ProvisioningAction> singletonList(new UpdateInstallableUnitProfilePropertiesAction());
+ return Collections.singletonList(new UpdateInstallableUnitProfilePropertiesAction());
}
- return Collections.<ProvisioningAction> singletonList(new RemoveInstallableUnitProfilePropertiesAction());
+ return Collections.singletonList(new RemoveInstallableUnitProfilePropertiesAction());
}
}
return null;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
index 2dac78352..ffd372115 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * 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
@@ -32,7 +32,7 @@ public class IUProfilePropertyQuery extends ExpressionMatchQuery<IInstallableUni
private static IMatchExpression<IInstallableUnit> createMatch(String propertyName, String propertyValue) {
IExpressionFactory factory = ExpressionUtil.getFactory();
- return ANY.equals(propertyValue) ? factory.<IInstallableUnit> matchExpression(matchAny, propertyName) : factory.<IInstallableUnit> matchExpression(matchValue, propertyName, propertyValue);
+ return ANY.equals(propertyValue) ? factory.matchExpression(matchAny, propertyName) : factory.<IInstallableUnit> matchExpression(matchValue, propertyName, propertyValue);
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
index cb57866f9..110296986 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * 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
@@ -16,9 +16,9 @@ import java.util.*;
* @since 2.0
*/
public final class Memento {
- private static final Collection<Class<?>> simples = Arrays.<Class<?>> asList(String.class, Integer.class, Long.class, Float.class, Double.class, Byte.class, Short.class, Character.class, Boolean.class);
- private static final Collection<Class<?>> simpleArrays = Arrays.<Class<?>> asList(String[].class, Integer[].class, Long[].class, Float[].class, Double[].class, Byte[].class, Short[].class, Character[].class, Boolean[].class);
- private static final Collection<Class<?>> primitiveArrays = Arrays.<Class<?>> asList(long[].class, int[].class, short[].class, char[].class, byte[].class, double[].class, float[].class, boolean[].class);
+ private static final Collection<Class<?>> simples = Arrays.asList(String.class, Integer.class, Long.class, Float.class, Double.class, Byte.class, Short.class, Character.class, Boolean.class);
+ private static final Collection<Class<?>> simpleArrays = Arrays.asList(String[].class, Integer[].class, Long[].class, Float[].class, Double[].class, Byte[].class, Short[].class, Character[].class, Boolean[].class);
+ private static final Collection<Class<?>> primitiveArrays = Arrays.asList(long[].class, int[].class, short[].class, char[].class, byte[].class, double[].class, float[].class, boolean[].class);
Map<String, Object> mementoMap = new HashMap<>();

Back to the top