Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McDuff2009-01-03 09:58:58 -0500
committerSimon McDuff2009-01-03 09:58:58 -0500
commit0d9b2379d3594badad1609b1f992da178b4b578f (patch)
treeb96a4b400a6cdcb299cc97b86b56475ec250036b /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util
parenta6fdbd5a8cd79603ceacdb6553727b87ac2a4c07 (diff)
downloadcdo-0d9b2379d3594badad1609b1f992da178b4b578f.tar.gz
cdo-0d9b2379d3594badad1609b1f992da178b4b578f.tar.xz
cdo-0d9b2379d3594badad1609b1f992da178b4b578f.zip
[258933] CDORevisionImpl.eIsSet() works incorrectly
https://bugs.eclipse.org/bugs/show_bug.cgi?id=258933
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
index 8f8a6647a2..bcf23d7c52 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
@@ -50,6 +50,7 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
/**
* @author Eike Stepper
@@ -272,7 +273,13 @@ public final class ModelUtil
String name = eFeature.getName();
CDOType type = getCDOType(eFeature);
boolean many = EMFUtil.isMany(eFeature);
- return CDOModelUtil.createAttribute(containingClass, featureID, name, type, many);
+ Object defaultValue = eFeature.getDefaultValue();
+ if (type == CDOType.CUSTOM)
+ {
+ defaultValue = EcoreUtil.convertToString((EDataType)eFeature.getEType(), defaultValue);
+ }
+
+ return CDOModelUtil.createAttribute(containingClass, featureID, name, type, defaultValue, many);
}
public static EPackage getEPackage(CDOPackage cdoPackage, CDOPackageRegistry packageRegistry)

Back to the top