| Summary: | ConvertToEMF doesn't work properly with many-valued EDataTypes | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Heiko Techteam <techteam> | ||||||||||
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | nacor | ||||||||||
| Version: | 4.0 | Keywords: | needinfo | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Heiko Techteam
Attached Patch should fix the problem if the custom values are in a CDOList. Created attachment 174433 [details]
fix it, if values are in list
Comment on attachment 174433 [details]
fix it, if values are in list
Heiko, please confirm that:
1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
I added test case org.eclipse.emf.cdo.tests.AttributeTest.testManyValuedCustomDataType_Bugzilla_319950() and it does not fail. Heiko, please look at it and try to explain why it does not fail. Or better, provide a test case that reproduces your exact problem, then reopen this bug. Problem is not reproducible. Comment on attachment 174433 [details]
fix it, if values are in list
CDOType is not concerned with the many-valued aspect of features. I think if a list arrives in a CDOType method this should be fixed elsewhere. I'm also not sure if replacing a CDOListImpl with a BasicEList is a good idea.
Created attachment 174546 [details]
Modified Attriubute test
Hi Eike,
I have seen your Test and hav it modified so the he reproduced the error.
I found this error, when I tried to use the
org.eclipse.emf.cdo.internal.ui.actions.ExportResourceAction
From there I also copied the function to reproduce.
In the first patch I use the BasicEList, because it should export to a file.
Where are the point to reopen the bug?
These two lines are able to show the problem:
EList<EObject> contents = resource.getContents();
EcoreUtil.copyAll(contents);
Created attachment 175196 [details]
Test v3
Created attachment 175197 [details]
Test+Fix - for future reference
The problem was in CDOStore.isSet() where the many-valued feature was accessed with get(feature, NO_INDEX).
NO_INDEX must only be used with single-valued features.
Committed to HEAD Heiko, please confirm that: 1) The number of lines that you changed is smaller than 250. 2) You are the only author of these changed lines. 3) You apply the EPL to these changed lines. Otherwise we get into trouble with the legal department ;-( I confirm that: 1) The number of lines that I changed is smaller than 250. 2) I'm the only author of these changed lines. 3) I apply the EPL to these changed lines. Comment on attachment 174546 [details]
Modified Attriubute test
Thx ;-)
Available in R20110608-1407 |