Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-11-19 03:22:45 -0500
committerGerrit Code Review @ Eclipse.org2013-11-19 04:08:59 -0500
commit1eece4f1366d56ff50e5b41df6c2845fef0214ad (patch)
tree99856307405eefe819f385375658141a2e6a17ca /bundles/org.eclipse.equinox.p2.engine/src
parente193ccd994def3fd574aee5335e8cf8a1c610ae4 (diff)
downloadrt.equinox.p2-1eece4f1366d56ff50e5b41df6c2845fef0214ad.tar.gz
rt.equinox.p2-1eece4f1366d56ff50e5b41df6c2845fef0214ad.tar.xz
rt.equinox.p2-1eece4f1366d56ff50e5b41df6c2845fef0214ad.zip
Bug 422026 - Get rid of ColletionUtils.empty[Set|List|Map]
Now that p2 has Java 1.5 as a minimum there is no reason to not use the JVM methods. Change-Id: I89444e8d1e174c316e2b17fb4f53bc7b1d097c0a 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.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java3
3 files changed, 4 insertions, 7 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 d2ec31645..0045d8c79 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
@@ -13,7 +13,6 @@ package org.eclipse.equinox.internal.p2.engine;
import java.util.*;
import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
@@ -109,7 +108,7 @@ public abstract class InstallableUnitPhase extends Phase {
Collection<ITouchpointData> data = unit.getTouchpointData();
int dataSize = data.size();
if (dataSize == 0)
- return CollectionUtils.emptyList();
+ return Collections.<ITouchpointInstruction> emptyList();
ArrayList<ITouchpointInstruction> matches = new ArrayList<ITouchpointInstruction>(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 f2de40a53..31a77f98a 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
@@ -12,7 +12,6 @@ package org.eclipse.equinox.internal.p2.engine;
import java.util.*;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.osgi.util.NLS;
@@ -50,7 +49,7 @@ public class InstructionParser {
private Map<String, ActionEntry> parseImportAttribute(String importAttribute) {
if (importAttribute == null)
- return CollectionUtils.emptyMap();
+ return Collections.<String, ActionEntry> emptyMap();
Map<String, ActionEntry> result = new HashMap<String, ActionEntry>();
StringTokenizer tokenizer = new StringTokenizer(importAttribute, ","); //$NON-NLS-1$
@@ -83,7 +82,7 @@ public class InstructionParser {
String nameValuePairs = statement.substring(openBracket + 1, closeBracket);
if (nameValuePairs.length() == 0)
- return new ParameterizedProvisioningAction(action, CollectionUtils.<String, String> emptyMap(), statement);
+ return new ParameterizedProvisioningAction(action, Collections.<String, String> emptyMap(), statement);
StringTokenizer tokenizer = new StringTokenizer(nameValuePairs, ","); //$NON-NLS-1$
Map<String, String> parameters = new HashMap<String, String>();
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 a5c19951f..1572bf9ee 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
@@ -15,7 +15,6 @@ import java.util.*;
import java.util.Map.Entry;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
import org.eclipse.equinox.internal.p2.metadata.*;
import org.eclipse.equinox.internal.p2.metadata.index.*;
@@ -149,7 +148,7 @@ public class Profile extends IndexProvider<IInstallableUnit> implements IProfile
*/
public List<String> getSubProfileIds() {
if (subProfileIds == null)
- return CollectionUtils.emptyList();
+ return Collections.<String> emptyList();
return Collections.unmodifiableList(subProfileIds);
}

Back to the top