Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-05-05 09:52:46 -0400
committerAndrey Loskutov2017-05-05 09:53:58 -0400
commit8eba2421be077d94ba9f58581e2eb5890c949033 (patch)
tree6fb05b24412a87f365f71f84bd43b5b2ef9fc426
parentf7105dffc4cec6de6927ffc5a6985f1b79dc2752 (diff)
downloadeclipse.platform.team-8eba2421be077d94ba9f58581e2eb5890c949033.tar.gz
eclipse.platform.team-8eba2421be077d94ba9f58581e2eb5890c949033.tar.xz
eclipse.platform.team-8eba2421be077d94ba9f58581e2eb5890c949033.zip
ISynchronizationScope.getTraversals(ResourceMapping) can return null, so code using it should check for null. Change-Id: I79bd627c87917f2700e98f1c23dadf47d1128e33 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
index bbf291f3e..83e029d50 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
@@ -166,6 +166,9 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
if (scope.contains(resource)) {
List<ResourceTraversal> result = new ArrayList<>();
ResourceTraversal[] traversals = scope.getTraversals();
+ if(traversals == null) {
+ return result.toArray(new ResourceTraversal[result.size()]);
+ }
for (int i = 0; i < traversals.length; i++) {
ResourceTraversal traversal = traversals[i];
if (traversal.contains(resource)) {
@@ -209,7 +212,9 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
mapping = scope.getMapping(element);
if (mapping != null) {
ResourceTraversal[] traversals = scope.getTraversals(mapping);
- result.addAll(Arrays.asList(traversals));
+ if(traversals != null) {
+ result.addAll(Arrays.asList(traversals));
+ }
}
}
}

Back to the top