Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-05-27 08:38:33 +0000
committerEike Stepper2020-05-27 08:38:33 +0000
commitbbe35d2d414c17ff5f1e3cdc0295f1f8ae0266b7 (patch)
tree02b653e619db76a0164776323f792d0231e8643f /plugins/org.eclipse.emf.cdo.common/src
parenta04528ec9ce299a2fc5b8c664de1e34b5a2be527 (diff)
downloadcdo-bbe35d2d414c17ff5f1e3cdc0295f1f8ae0266b7.tar.gz
cdo-bbe35d2d414c17ff5f1e3cdc0295f1f8ae0266b7.tar.xz
cdo-bbe35d2d414c17ff5f1e3cdc0295f1f8ae0266b7.zip
[563620] DynamicValueHolder.NIL not converted after internal access to CDORevisionData
https://bugs.eclipse.org/bugs/show_bug.cgi?id=563620
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.common/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionData.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java11
2 files changed, 14 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionData.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionData.java
index 34525f8bf1..105966ebac 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionData.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionData.java
@@ -26,6 +26,9 @@ import org.eclipse.emf.ecore.impl.BasicEObjectImpl;
public interface CDORevisionData
{
/**
+ * An object used to represent being set to <code>null</code>
+ * as opposed to having no value and hence being in the default state.
+ * <p>
* The equivalent of <code>DynamicValueHolder.NIL</code> (i.e. explicit <code>null</code>).
*
* @since 3.0
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java
index b471c6a17c..bc0fef0f49 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java
@@ -282,6 +282,17 @@ public abstract class CDOTypeImpl implements CDOType
}
@Override
+ public Object convertToEMF(EClassifier feature, Object value)
+ {
+ if (value == CDORevisionData.NIL)
+ {
+ return null;
+ }
+
+ return super.convertToEMF(feature, value);
+ }
+
+ @Override
public Object doAdjustReferences(CDOReferenceAdjuster adjuster, Object value, EStructuralFeature feature, int index)
{
return adjuster.adjustReference(value, feature, index);

Back to the top