diff options
author | Christian W. Damus | 2013-03-22 20:01:59 +0000 |
---|---|---|
committer | Christian W. Damus | 2013-03-22 20:01:59 +0000 |
commit | 9d6790a4b2bfe3a05f5d5011cab9126de510de1e (patch) | |
tree | 8e27d7b9d7bbf6b49388e01898ddd289e584670d | |
parent | 3b052347cc1697e0b028da8ddadf56d59532f402 (diff) | |
download | cdo-drops/I20130329-0410.tar.gz cdo-drops/I20130329-0410.tar.xz cdo-drops/I20130329-0410.zip |
[404184] [Dawn] NPE in DawnConflictHelper on View that has no elementdrops/I20130329-0410
https://bugs.eclipse.org/bugs/show_bug.cgi?id=404184
-rw-r--r-- | plugins/org.eclipse.emf.cdo.dawn.gmf/src/org/eclipse/emf/cdo/dawn/gmf/synchronize/DawnConflictHelper.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.gmf/src/org/eclipse/emf/cdo/dawn/gmf/synchronize/DawnConflictHelper.java b/plugins/org.eclipse.emf.cdo.dawn.gmf/src/org/eclipse/emf/cdo/dawn/gmf/synchronize/DawnConflictHelper.java index abc45a71b4..fe5ba57483 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.gmf/src/org/eclipse/emf/cdo/dawn/gmf/synchronize/DawnConflictHelper.java +++ b/plugins/org.eclipse.emf.cdo.dawn.gmf/src/org/eclipse/emf/cdo/dawn/gmf/synchronize/DawnConflictHelper.java @@ -7,6 +7,7 @@ * * Contributors: * Martin Fluegge - initial API and implementation + * Christian W. Damus (CEA) - Bug 404184: handle View that has no element */ package org.eclipse.emf.cdo.dawn.gmf.synchronize; @@ -84,7 +85,7 @@ public class DawnConflictHelper /** * TODO this method should decide whether the object is conflicted or not using special Policies * - * @param object + * @param object a non-{@code null} object * @return whether the object is conflicted */ public static boolean isConflicted(EObject object) @@ -96,10 +97,12 @@ public class DawnConflictHelper } if (object instanceof View) { - CDOObject element = CDOUtil.getCDOObject(((View)object).getElement()); - if (element.cdoConflict()) + // if the view is not, itself, conflicted, maybe its semantic element is (if it has one) + EObject element = ((View)object).getElement(); + if (element != null) { - return true; + CDOObject cdoElement = CDOUtil.getCDOObject(element); + return cdoElement.cdoConflict(); } } return false; |