Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 292063 - reference URL with encoded character for space (%20) fails to connect
Summary: reference URL with encoded character for space (%20) fails to connect
Status: CLOSED DUPLICATE of bug 290193
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 12:42 EDT by Davanum Srinivas CLA
Modified: 2009-10-12 13:29 EDT (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 Davanum Srinivas CLA 2009-10-12 12:42:31 EDT
Hi,

I am trying to run the following:
context.installBundle(urlString);

with urlString as: 
reference:file:/mnt/sda1/dims/ab%20cd/lib/equinox/org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100.jar

and see this problem:
Caused by: java.io.FileNotFoundException: /mnt/sda1/dims/ab%20cd/lib/equinox/org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100.jar
        at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.connect(ReferenceURLConnection.java:46)
        at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.getInputStream(ReferenceURLConnection.java:61)
        at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:56)
        ... 17 more

Looks like the connect method in ReferenceURLConnection.java just strips the "file:" and tries to use that as the file name.

Should the code try to use say URLDecoder.decode to convert the "%20" back to a space?

thanks,
dims
Comment 1 Thomas Watson CLA 2009-10-12 13:29:12 EDT

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