| Summary: | ClassCastException adding an object to an EList with objects of a custom data type | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Eike Stepper <stepper> |
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> |
| Status: | CLOSED WORKSFORME | QA Contact: | Eike Stepper <stepper> |
| Severity: | normal | ||
| Priority: | P3 | CC: | lindeman1966 |
| Version: | 4.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Eike Stepper
I added this to model5.ecore:
<eClassifiers xsi:type="ecore:EClass" name="GenListOfIntArray">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="elements" upperBound="-1"
eType="#//IntArray"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="IntArray" instanceClassName="int[]"/>
I added Bugzilla_322804_Test:
public void testAddElementToCustomTypedList() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.createResource("/r1");
msg("Fill and commit a resource");
GenListOfIntArray object = getModel5Factory().createGenListOfIntArray();
resource.getContents().add(object);
transaction.commit();
msg("Add int[] elements");
object.getElements().add(new int[] { 1, 2, 3, 4, 5 });
object.getElements().add(new int[] { 10, 20, 30, 40, 50 });
transaction.commit();
session.close();
}
Committed to HEAD
The test passes. Closing as WORKSFORME. Please reopen if you can reproduce the problem. Closing. |