Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-11-25 20:18:03 +0000
committerAlexander Kurtakov2019-12-11 14:24:25 +0000
commite5cf1508417c3c563dab9e5583dfeaac8865d9aa (patch)
tree42daf162fe11cbfd6ff5b9b83fbf233b51395266 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner
parente436bd3cf051a659d9dda8f6654a62eeece26b7c (diff)
downloadrt.equinox.p2-e5cf1508417c3c563dab9e5583dfeaac8865d9aa.tar.gz
rt.equinox.p2-e5cf1508417c3c563dab9e5583dfeaac8865d9aa.tar.xz
rt.equinox.p2-e5cf1508417c3c563dab9e5583dfeaac8865d9aa.zip
Use jdk 5 for-each loop
Replace simple uses of Iterator with a corresponding for-loop. Also add missing braces on loops as necessary. Change-Id: Ic951555a6a16cb5ea54f6150bb55254f6b17fe03 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java
index e6fe1f706..e82e23cfa 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java
@@ -18,7 +18,6 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -63,8 +62,7 @@ public class EPPPackageInstallStability_bug323322 extends AbstractProvisioningTe
//Extract all the unresolved IUs.
Set<IInstallableUnit> tmp = plan.getAdditions().query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).query(QueryUtil.ALL_UNITS, null).toSet();
- for (Iterator<IInstallableUnit> iterator = tmp.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
+ for (IInstallableUnit iu : tmp) {
iusFromFirstResolution.add(iu.unresolved());
}
}
@@ -84,8 +82,7 @@ public class EPPPackageInstallStability_bug323322 extends AbstractProvisioningTe
Set<IInstallableUnit> tmp = plan.getAdditions().query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).query(QueryUtil.ALL_UNITS, null).toSet();
Set<IInstallableUnit> iusFromSecondResolution = new HashSet<>();
- for (Iterator<IInstallableUnit> iterator = tmp.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
+ for (IInstallableUnit iu : tmp) {
iusFromSecondResolution.add(iu.unresolved());
}

Back to the top