Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329032

Summary: Proxy resolution not working with relative resource path
Product: [Modeling] MDT.BPMN2 Reporter: Henning Heitkoetter <hheitkoetter>
Component: CoreAssignee: Henning Heitkoetter <hheitkoetter>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Henning Heitkoetter CLA 2010-10-29 07:51:29 EDT
If a resource has a relative URI, the resolution of QNames pointing to objects in the same resource does not work, because there is nothing to resolve against in QNameURIHandler.resolve (URI resolution needs an absolute base URI).

A reference to an object in the same file is thus loaded as a proxy with URI "#ID" (only fragment), while it should be "uriOfResource#ID". The former can not be resolved by EcoreUtil.resolve.
Comment 1 Henning Heitkoetter CLA 2010-10-29 07:52:07 EDT
Fix coming soon.
Comment 2 Henning Heitkoetter CLA 2010-10-29 07:52:08 EDT
Created attachment 182034 [details]
mylyn/context/zip
Comment 3 Henning Heitkoetter CLA 2010-10-29 08:08:13 EDT
Fixed in 6737ae93cec4ae2f77a85683630a15b3e7695f0a
Comment 4 Henning Heitkoetter CLA 2010-11-08 05:51:46 EST
Reiner noticed that the fix lead to the creation of proxies for IDREF references and subsequent problems with abstract target types (FlowNode).

A new commit (61aec4a2ab2776081bbaf4b07d9d6ab729edbdc4) fixes this by not converting what could be a QName in case of IDREFs (resolve proxies = false).
The behaviour is checked by three test cases: XMLSerializationTest.testIDReferenceToAbstractType; QNameReferenceTest.testIntraModelReferencesRelative / Absolute