Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-01-13 15:49:52 +0000
committerLars Vogel2020-01-13 18:54:11 +0000
commit9c39c6916e419f47717f76c025e1b2f2cd1f72b6 (patch)
treea63b0cfaff2a5508f8e1bab394c7adc0a86a9317 /org.eclipse.debug.core
parentcf7a4867309401b9b4bb97fd4ba769a113696aa7 (diff)
downloadeclipse.platform.debug-9c39c6916e419f47717f76c025e1b2f2cd1f72b6.tar.gz
eclipse.platform.debug-9c39c6916e419f47717f76c025e1b2f2cd1f72b6.tar.xz
eclipse.platform.debug-9c39c6916e419f47717f76c025e1b2f2cd1f72b6.zip
Iterate over Map.entrySet instead of Map.keySet and value searchI20200114-1805
Faster than first getting the keys and afterwards reading the value. Done with Autorefactor https://github.com/JnRouvignac/AutoRefactor/ batch conversion using the iterate over Map.entrySet instead of Map.keySet and value search Change-Id: I438796d7ce3abd35c5a8922559c582ef8685ed08 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java5
1 files changed, 3 insertions, 2 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 6a8f651d9..de3c2f2b7 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
@@ -321,7 +321,8 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
List<GroupLaunchElement> result = new ArrayList<>();
try {
Map<String, Object> attrs = configuration.getAttributes();
- for (String attr : attrs.keySet()) {
+ for (Map.Entry<String, Object> entry : attrs.entrySet()) {
+ String attr = entry.getKey();
try {
if (attr.startsWith(MULTI_LAUNCH_CONSTANTS_PREFIX)) {
String prop = attr.substring(MULTI_LAUNCH_CONSTANTS_PREFIX.length() + 1);
@@ -332,7 +333,7 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
if (name.equals(NAME_PROP)) {
GroupLaunchElement el = new GroupLaunchElement();
el.index = index;
- el.name = (String) attrs.get(attr);
+ el.name = (String) entry.getValue();
Object actionParam = null;
String actionStr = (String) attrs.get(getProp(index, ACTION_PROP));

Back to the top