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

Bug 337014

Summary: reference:file: URL with %20 fails in EclipseStarter.searchForBundle()
Product: [Eclipse Project] Equinox Reporter: Chris Dolan <chris>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: tjwatson
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Chris Dolan CLA 2011-02-11 17:41:02 EST
Build Identifier: org.eclipse.osgi-3.6.1.R36x.jar

This is not the same bug as "Bug 290193 - The Equinox framework install bundle should tolerate escaped paths".

I have a config.ini that contains an osgi.bundles entry that looks like the following (with "[...]" replacing the real path):
  reference:file:/C:/Program%20Files/[...]/foo.jar@start

This leads to the following error message:

!ENTRY org.eclipse.osgi 4 0 2011-02-11 16:25:16.314
!MESSAGE Bundle reference:file:/C:/Program%20Files/[...]/foo.jar@start not found.

Tracing in the debugger, I can see that this URL causes EclipseStarter.searchForBundle() to return null.  I suspect that the root cause of the problem is this line:

    fileLocation = new File(baseURL.getFile());

because fileLocation incorrectly contains the "%20" after that statement.

The obvious workaround is to put the decoded URL into config.ini, but the resolution of Bug 290193 implies that this syntax should be supported.  I suspect that a patch very similar to the one in 290193 would solve this bug too.


Reproducible: Always

Steps to Reproduce:
1. put a line like the following in config.ini, pointing to a real jar:
osgi.bundles=reference:file:/C:/Program%20Files/[...]/foo.jar@start
2. launch EclipseStarter.main() with "-configuration <dir of config.ini>"
Comment 1 Thomas Watson CLA 2011-02-14 08:28:55 EST
This is fixed in 3.7 M4.

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