Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 257727 - Reference and File URLs encoding issues
Summary: Reference and File URLs encoding issues
Status: CLOSED DUPLICATE of bug 290193
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-05 11:24 EST by Simon Kaegi CLA
Modified: 2010-02-04 09:50 EST (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 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 ***