Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2013-03-22 16:01:59 -0400
committerChristian W. Damus2013-03-22 16:01:59 -0400
commit9d6790a4b2bfe3a05f5d5011cab9126de510de1e (patch)
tree8e27d7b9d7bbf6b49388e01898ddd289e584670d
parent3b052347cc1697e0b028da8ddadf56d59532f402 (diff)
downloadcdo-9d6790a4b2bfe3a05f5d5011cab9126de510de1e.tar.gz
cdo-9d6790a4b2bfe3a05f5d5011cab9126de510de1e.tar.xz
cdo-9d6790a4b2bfe3a05f5d5011cab9126de510de1e.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.java11
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;

Back to the top