Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2013-04-29 09:37:43 +0000
committerAxel Richard2013-04-29 09:38:29 +0000
commit1ffdc8712ab290038ecb534843f460867774beb6 (patch)
tree5a93dc0e2cbd98110d30a267c1f01ba503dd0872
parent1410894fbc2d9549d8124518e0b782d252a1b908 (diff)
downloadorg.eclipse.emf.compare-1ffdc8712ab290038ecb534843f460867774beb6.tar.gz
org.eclipse.emf.compare-1ffdc8712ab290038ecb534843f460867774beb6.tar.xz
org.eclipse.emf.compare-1ffdc8712ab290038ecb534843f460867774beb6.zip
[406539] - NPE when using groups
Test null value of match before calling method on it.
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerContentProvider.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerContentProvider.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerContentProvider.java
index 68d08db15..a7658d956 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerContentProvider.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerContentProvider.java
@@ -311,8 +311,13 @@ class EMFCompareStructureMergeViewerContentProvider extends AdapterFactoryConten
if (!isPartOfTree.apply((Diff)object)) {
if (object instanceof ReferenceChange
&& ((ReferenceChange)object).getReference().isContainment()) {
- ret = Iterables.any(((Diff)object).getMatch().getComparison().getMatch(
- ((ReferenceChange)object).getValue()).getAllDifferences(), isPartOfTree);
+ Match match = ((Diff)object).getMatch().getComparison().getMatch(
+ ((ReferenceChange)object).getValue());
+ if (match != null) {
+ ret = Iterables.any(match.getAllDifferences(), isPartOfTree);
+ } else {
+ ret = false;
+ }
}
} else {
ret = true;

Back to the top