Bug 142326 - PathmapManager only denormalizes file: and platform:/resource URIs
Summary: PathmapManager only denormalizes file: and platform:/resource URIs
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P1 critical
Target Milestone: 1.0   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-05-17 15:44 EDT by Christian Damus CLA
Modified: 2010-07-19 12:24 EDT (History)
2 users (show)

See Also:


Attachments
Patch to fix the problem (1.02 KB, patch)
2006-05-17 15:59 EDT, Christian Damus CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2006-05-17 15:44:51 EDT
The PathmapManager only denormalizes file: and platform:/resource URI schemes.  As a result, when I create a Resource (using ResourceSet.createResource(URI) method) for a pathmapped URI of a resource deployed in a bundle JAR, it ends up having a different URI than I asked to be created, and my application goes bonkers.

This happens because my pathmap://FOO/bar.xmi URI is normalized to jar:file:/path/to/eclipse/plugins/com.example_1.0.0.jar!/resources/bar.xmi but then denormalization fails because the jar:file: scheme is arbitrarily disallowed.  So, instead of getting a resource with the pathmap URI, I get a resource with the jar:file: URI.

For any pathmap: URI that the PathmapManager can normalize, the PathmapManager *must* be able to denormalize it to restore the original pathmap: URI.
Comment 1 Christian Damus CLA 2006-05-17 15:59:19 EDT
Created attachment 41789 [details]
Patch to fix the problem

Attached a patch that fixes the problem by removing an extraneous check for file: or platform:/resource URI schemes in the PathmapManager.denormalize() method.
Comment 2 Christian Damus CLA 2006-05-17 15:59:49 EDT
Adding Vishy to cc: to review and (hopefully) commit the patch.
Comment 3 Vishy Ramaswamy CLA 2006-05-17 19:12:22 EDT
Reviewed and applied patch
Comment 4 Vishy Ramaswamy CLA 2006-05-17 19:12:35 EDT
Committed patch
Comment 5 Richard Gronback CLA 2008-08-13 13:05:04 EDT
[target cleanup] 1.0 RC3 was the original target milestone for this bug
Comment 6 Eclipse Webmaster CLA 2010-07-19 12:24:25 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug