Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337014 - reference:file: URL with %20 fails in EclipseStarter.searchForBundle()
Summary: reference:file: URL with %20 fails in EclipseStarter.searchForBundle()
Status: CLOSED DUPLICATE of bug 328926
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 17:41 EST by Chris Dolan CLA
Modified: 2011-02-14 08:28 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 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 ***