| Summary: | Not serializable exception thrown when producing a class declaring an attribute of a refined generic type. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] MMT.ATL | Reporter: | Dominique Blouin <dominique.blouin> | ||||
| Component: | emfvm | Assignee: | mmt-atl.toolkit-inbox <mmt-atl.toolkit-inbox> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 207231 [details] Source code of the modified class. I have an Ecore class A declaring an attribute whose type is declared as a class generic parameter. Class B extends class A and refines the type of the attribute to a specific data type. E.g.: public class A<U extends Object> protected U unit; public class B extends A<EEnumX> where EEnumx is a specific Ecore enumeration declared in the meta-model. Problem: A not serializable exception in thrown when producing an instance of class A because the proper type of the attribute (EEnumX) is not retrieved properly. Fix: To fix this, I have redefined EMFModelAdapter.getType() so that if the attribute declares a generic type, the proper type is returned. I attach the modified EMFModelAdapter class. A similar problem occurs with the Regular VM.