Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2013-04-10 18:10:03 +0000
committerEike Stepper2013-04-10 18:10:03 +0000
commita9f55ebde6708eeb40aa67e384bc950b8c2c18aa (patch)
treecc0d29ddf0432136d2417cc7b2f7f520e77bcc71
parentc5b88c201f9a383b2353b5a796b782ac04f86ab2 (diff)
downloadcdo-a9f55ebde6708eeb40aa67e384bc950b8c2c18aa.tar.gz
cdo-a9f55ebde6708eeb40aa67e384bc950b8c2c18aa.tar.xz
cdo-a9f55ebde6708eeb40aa67e384bc950b8c2c18aa.zip
[400236] [Legacy] ClassCastException on CDOLegacyWrapper when native
reference legacy https://bugs.eclipse.org/bugs/show_bug.cgi?id=400236
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStoreImpl.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStoreImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStoreImpl.java
index 4acf823001..a40952ea04 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStoreImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStoreImpl.java
@@ -11,6 +11,7 @@
* Eike Stepper & Simon McDuff - bug 204890
* Simon McDuff - bug 246705
* Simon McDuff - bug 246622
+ * Christian W. Damus (CEA) - bug 400236: get internal instance of objects in ID conversion
*/
package org.eclipse.emf.internal.cdo.view;
@@ -693,7 +694,7 @@ public final class CDOStoreImpl implements CDOStore
}
}
- return value;
+ return getInternalInstance(value);
}
private InternalCDOObject getCDOObject(Object object)
@@ -701,6 +702,16 @@ public final class CDOStoreImpl implements CDOStore
return FSMUtil.adapt(object, view);
}
+ private Object getInternalInstance(Object object)
+ {
+ if (object instanceof InternalCDOObject)
+ {
+ return ((InternalCDOObject)object).cdoInternalInstance();
+ }
+
+ return object;
+ }
+
private static InternalCDORevision getRevisionForReading(InternalCDOObject cdoObject)
{
CDOStateMachine.INSTANCE.read(cdoObject);

Back to the top