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

Bug 292063

Summary: reference URL with encoded character for space (%20) fails to connect
Product: [Eclipse Project] Equinox Reporter: Davanum Srinivas <davanum>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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 ***