Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340001 - Remove current solution for serializing EAnnotations
Summary: Remove current solution for serializing EAnnotations
Status: RESOLVED FIXED
Alias: None
Product: EMFStore
Classification: Modeling
Component: ServerCore (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 07:27 EDT by Edgar Mueller CLA
Modified: 2011-03-30 05:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edgar Mueller CLA 2011-03-15 07:27:38 EDT
When serializing all attributes of a EAnnotation into CreateDeleteOperation#getEObjectToIdMap(), deserialization fails for the details map of the source attribute. That is because the source attribute contains a URI, which will be used to reference its details map.  But since a URI contains forward slashes, which are also used for referencing the EObjects within the serialized file, the URI will be escaped. When trying to deserialize CreateDeleteOperation#getEObjectToIdMap() again, the the map contains null keys for all objects, that were referenced via the source's URI. 

One possible solution, which is also used at the moment, is to encode the source attribute via:

annotation.setSource(URLEncoder.encode(annotation.getSource())

but then one also has to pay attention to decode the URI at the appropriate places.
Comment 1 Maximilian Koegel CLA 2011-03-30 05:06:38 EDT
removed custom code