Community
Participate
Working Groups
When I process a Resource, I sometimes convert the content, with a little piece of code like this: Code: [Select all] [Show/ hide] public static class CollectionForObjects<T> { public List<T> collectionForObjects(List<EObject> objects) { List<T> typedList = Lists.transform(objects, new Function<EObject, T>() { @SuppressWarnings("unchecked") public T apply(EObject from) { return (T) from; } }); return typedList; } } This used to work fine in CDO 4.0, with 4.2 however I get this class cast exception below. So a CDOElementProxy, can't be cast to an EObject, what could I do with it to get a collection of target objects? What has changed? java.lang.ClassCastException: org.eclipse.emf.cdo.internal.common.revision.CDOElementProxyImpl cannot be cast to org.eclipse.emf.ecore.EObject at com.netxforge.netxstudio.common.model.ModelUtils$CollectionForObjects$1.apply(ModelUtils.java:1) at com.google.common.collect.Lists$TransformingSequentialList$1.next(Lists.java:381) at com.netxforge.netxstudio.common.model.ModelUtils.roleForUserWithName(ModelUtils.java:1959) at com.netxforge.netxstudio.data.DataService.getCurrentRole(DataService.java:71) at com.netxforge.netxstudio.ui.ApplicationWorkbenchAdvisor.resetWorkbenchIfRoleChanged(ApplicationWorkbenchAdvisor.java:69)
Created attachment 227595 [details] test case test case to reproduce the problem
the test case doesn't fail. I re-enabled the collection loading policy in my application, and this also now works. The difference is the CDO integration build I am now using versus the one when the bug was reported. The build I am using (Not having this bug). emf-cdo-I20130201-0411-Dropins
propose to close, advise to use recent CDO integration build with 4.2
We'll try to address open problems in 4.3 (master) first and then port fixes back to 4.2.
Moving all open bugzillas to 4.5.
Moving all unaddressed bugzillas to 4.6.
Moving all open bugs to 4.7
Moving all unresolved issues to version 4.8-
Moving all unresolved issues to version 4.9
Moving to 4.13.