Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchammer2019-11-12 21:32:15 +0000
committerKarsten Thoms2019-12-10 15:39:01 +0000
commit0dfb589593e911582f232afb028866cf213e458d (patch)
treef467e44de3d7f5d85df8fe25f004c392fbaefa9f /org.eclipse.debug.core
parent0c32a78b8fd287cbabb8ae666c8d4334fbc53912 (diff)
downloadeclipse.platform.debug-0dfb589593e911582f232afb028866cf213e458d.tar.gz
eclipse.platform.debug-0dfb589593e911582f232afb028866cf213e458d.tar.xz
eclipse.platform.debug-0dfb589593e911582f232afb028866cf213e458d.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: Ibbb60232f6a15f80f8975ca5f9056104be5351ba Signed-off-by: chammer <carsten.hammer@t-online.de>
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java
index 153bd3886..6a8f651d9 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java
@@ -19,7 +19,6 @@ package org.eclipse.debug.internal.core.groups;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -321,9 +320,8 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
public static List<GroupLaunchElement> createLaunchElements(ILaunchConfiguration configuration) {
List<GroupLaunchElement> result = new ArrayList<>();
try {
- Map<?, ?> attrs = configuration.getAttributes();
- for (Iterator<?> iterator = attrs.keySet().iterator(); iterator.hasNext();) {
- String attr = (String) iterator.next();
+ Map<String, Object> attrs = configuration.getAttributes();
+ for (String attr : attrs.keySet()) {
try {
if (attr.startsWith(MULTI_LAUNCH_CONSTANTS_PREFIX)) {
String prop = attr.substring(MULTI_LAUNCH_CONSTANTS_PREFIX.length() + 1);
@@ -406,9 +404,7 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
public static void removeLaunchElements(ILaunchConfigurationWorkingCopy configuration) {
try {
- Map<?, ?> attrs = configuration.getAttributes();
- for (Iterator<?> iterator = attrs.keySet().iterator(); iterator.hasNext();) {
- String attr = (String) iterator.next();
+ for (String attr : configuration.getAttributes().keySet()) {
try {
if (attr.startsWith(MULTI_LAUNCH_CONSTANTS_PREFIX)) {
configuration.removeAttribute(attr);

Back to the top