Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329752

Summary: ClassCast Exception in CDOLegacyWrapper.clearList()
Product: [Modeling] EMF Reporter: Alex Lagarde <alex.lagarde>
Component: cdo.legacyAssignee: Martin Fluegge <martin.fluegge>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: stepper
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1
none
Test v1 none

Description Alex Lagarde CLA 2010-11-09 05:29:26 EST
Build Identifier: 20100917-0705

The clearList() method of CDOLegacyWrapper casts each list item in InternalEObject. This can cause a ClassCast Exception, especially with enumerations (if the item implements Enumerator for example). 

By simply removing this cast, the problem don't occur and lists are correctly cleared.


Reproducible: Always
Comment 1 Martin Fluegge CLA 2010-11-09 13:43:25 EST
Created attachment 182743 [details]
Patch v1

I attached the fix. Since our test models do not have many references with enumerations I was not able to test it yet. 

I will change this soon...
Comment 2 Martin Fluegge CLA 2010-11-20 06:37:23 EST
Created attachment 183516 [details]
Test v1

I tweaked test model 2 a bit to make the problem reproducible. Now we are able to validate the patch.
Comment 3 Martin Fluegge CLA 2010-11-27 11:37:03 EST
Committed to HEAD.
Comment 4 Eike Stepper CLA 2011-06-23 03:42:08 EDT
Available in R20110608-1407