Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2016-02-11 11:04:27 +0000
committerPablo Torregrosa Paez2016-02-11 11:04:50 +0000
commit542702aca60cfa77a277a788203f303f5f0b8bdd (patch)
tree0d79df0a089a7f63cfbd743ccef69ca8a495bb63 /target_explorer/plugins
parent2b450a5a4d87be4d6beb2268b28ca28111cdbfe8 (diff)
downloadorg.eclipse.tcf-542702aca60cfa77a277a788203f303f5f0b8bdd.tar.gz
org.eclipse.tcf-542702aca60cfa77a277a788203f303f5f0b8bdd.tar.xz
org.eclipse.tcf-542702aca60cfa77a277a788203f303f5f0b8bdd.zip
Target Explorer: Fixed NPE and removal of shared path maps
Change-Id: I280e828a5f3c48cf3e0c2f3e153667e338b07df3 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
Diffstat (limited to 'target_explorer/plugins')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/AttachPathMapsListenerStep.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java9
2 files changed, 14 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/AttachPathMapsListenerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/AttachPathMapsListenerStep.java
index 7383641b2..71b5022f1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/AttachPathMapsListenerStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/AttachPathMapsListenerStep.java
@@ -90,7 +90,12 @@ public class AttachPathMapsListenerStep extends AbstractPeerStep {
} else {
existingRules = new ArrayList<IPathMap.PathMapRule>();
}
- List<PathMapRule> newRules = Arrays.asList(map);
+ List<PathMapRule> newRules;
+ if (map != null) {
+ newRules = Arrays.asList(map);
+ } else {
+ newRules = new ArrayList<IPathMap.PathMapRule>();
+ }
List<PathMapRule> diffRules = new ArrayList<IPathMap.PathMapRule>();
// Remove old shared path maps
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
index 17a0974ec..b27d870e7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
@@ -226,7 +226,14 @@ public class PathMapService extends AbstractService implements IPathMapService {
props.put(IPathMap.PROP_DESTINATION, rule.getDestination());
rulesToAdd.add(new org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule(props));
}
- sharedPathMapRules.put(((IPeer)context).getID(), rulesToAdd);
+
+ // Store new shared path map rules
+ List<PathMapRule> currentSharedPMRules = sharedPathMapRules.get(((IPeer)context).getID());
+ if (currentSharedPMRules == null) {
+ currentSharedPMRules = new ArrayList<IPathMap.PathMapRule>();
+ }
+ currentSharedPMRules.addAll(rulesToAdd);
+ sharedPathMapRules.put(((IPeer)context).getID(), currentSharedPMRules);
addPathMap(context, rules);
}
}

Back to the top