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

Bug 257727

Summary: Reference and File URLs encoding issues
Product: [Eclipse Project] Equinox Reporter: Simon Kaegi <simon_kaegi>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Simon Kaegi CLA 2008-12-05 11:24:45 EST
While looking at a bug in SimpleConfigurator I ran into a problems where I was supplying a URL which used encoded spaces to BundleContext.installBundle. 

e.g. 
I supplied:
1) reference:file:/some%20bundle.jar 
vs. 
2) reference:file:/some bundle.jar

--
The format in (1) is the canonical form however in practice we use (2). There's a long history of encoding problems with File URLs (for example File.toURL will produce an illegal URL) so we should consider handling both styles to be consistent with the FileURLConnection/Handler pair.

In talking with Tom two places that would need a look if we wanted to this sort of change are:
ReferenceURLConnection.connect
BundleInstall.start

We would also need to be careful about UNC paths which I'd guess we're handling in a special way.

Perhaps another way to look at handling this it to say that the bundle location is expected to be an unencoded URL although there might be other considerations to think about there.

--
For my problem in SimpleConfigurator I have control of bundle location creation so I'll pass in unencoded URLs to avoid any issues for now.
Comment 1 Thomas Watson CLA 2010-02-04 09:50:20 EST
This has been fixed.  I did not realize we had this old bug here.

*** This bug has been marked as a duplicate of bug 290193 ***