Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329752 - ClassCast Exception in CDOLegacyWrapper.clearList()
Summary: ClassCast Exception in CDOLegacyWrapper.clearList()
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.legacy (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Fluegge CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 05:29 EST by Alex Lagarde CLA
Modified: 2012-06-19 07:08 EDT (History)
1 user (show)

See Also:
stepper: review+


Attachments
Patch v1 (882 bytes, patch)
2010-11-09 13:43 EST, Martin Fluegge CLA
no flags Details | Diff
Test v1 (51.10 KB, patch)
2010-11-20 06:37 EST, Martin Fluegge CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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