Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-04-22 12:19:24 +0000
committerUwe Stieber2012-04-22 12:19:24 +0000
commitcc9c441102b0d923c5d2fd87fd7b4cc8c7cab202 (patch)
tree9cf677f2c6f26e588313cbc9bc322127f51c4e25 /target_explorer/plugins/org.eclipse.tcf.te.launch.core
parentbcfab58eafff418aee762e04e65c37a73b1ef431 (diff)
downloadorg.eclipse.tcf-cc9c441102b0d923c5d2fd87fd7b4cc8c7cab202.tar.gz
org.eclipse.tcf-cc9c441102b0d923c5d2fd87fd7b4cc8c7cab202.tar.xz
org.eclipse.tcf-cc9c441102b0d923c5d2fd87fd7b4cc8c7cab202.zip
Target Explorer: Fix FindBugs warning: WMI_WRONG_MAP_ITERATOR
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java
index a6dabe152..22381c728 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java
@@ -12,6 +12,7 @@ package org.eclipse.tcf.te.launch.core.lm;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
@@ -388,21 +389,21 @@ public class LaunchManager extends PlatformObject {
// get the launch manager delegate for the specific type
ILaunchManagerDelegate delegate = getLaunchManagerDelegate(type, launchMode);
// get all the launch configuration attributes
- Map<Object, Object> attributes = launchConfig.getAttributes();
+ Map<String, Object> attributes = launchConfig.getAttributes();
// loop over all listed attributes and copy them to the specification
- Iterator<Object> iterator = attributes.keySet().iterator();
+ Iterator<Entry<String, Object>> iterator = attributes.entrySet().iterator();
while (iterator.hasNext()) {
- String attributeKey = (String) iterator.next();
+ Entry<String, Object> entry = iterator.next();
if (withDefaultAttributes) {
// include the default attributes. So, just copy the stuff over.
- spec.addAttribute(attributeKey, attributes.get(attributeKey));
+ spec.addAttribute(entry.getKey(), entry.getValue());
}
else {
// exclude the default attributes. We have to find out if the attribute is
// set with default value.
- Object attributeValue = attributes.get(attributeKey);
- if (!delegate.isDefaultAttribute(attributeKey, attributeValue, launchConfig, launchMode)) {
- spec.addAttribute(attributeKey, attributeValue);
+ Object attributeValue = entry.getValue();
+ if (!delegate.isDefaultAttribute(entry.getKey(), attributeValue, launchConfig, launchMode)) {
+ spec.addAttribute(entry.getKey(), attributeValue);
}
}
}

Back to the top