Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329032 - Proxy resolution not working with relative resource path
Summary: Proxy resolution not working with relative resource path
Status: RESOLVED FIXED
Alias: None
Product: MDT.BPMN2
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Henning Heitkoetter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-29 07:51 EDT by Henning Heitkoetter CLA
Modified: 2010-11-08 05:51 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (1.35 KB, application/octet-stream)
2010-10-29 07:52 EDT, Henning Heitkoetter CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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