| Summary: | XMLSaveImpl.getDatatypeValue() throws NPE with Custom DataTypes | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Flavio Donze <flavio.donze> |
| Component: | XML/XMI | Assignee: | Ed Merks <Ed.Merks> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.5.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Flavio Donze
Conversion to string is all about producing a readable and serializeable string value, so I just don't see how it makes sense to convert a non-null value to null; upon deserialization we won't do any special processing to turn it back into a non-null value either. I see no value/motivation to change the framework to accommodate such a thing. I will then probably have to clean up my objects before I do an export. But just consider this. My Custom DataType is called ResourceType and contains a string field "path" which is the actual value of the DataType (returned in toString()). In some cases an EObjects field of type ResourceType is set but the "path" field is still null. In this case the NPE occurs. I think this can happen to similar datatypes as well. I don't need those ResourceTypes to be serialized nor deserialized, since they are empty. I don't follow your comments. We're simply never expecting a non-null value to convert to a null string. |