Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 262158 - StringIndexOutOfBoundsException in SimpleProfileRegistry.unescape(String)
Summary: StringIndexOutOfBoundsException in SimpleProfileRegistry.unescape(String)
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-23 08:00 EST by Karel Brezina CLA
Modified: 2009-01-23 09:39 EST (History)
0 users

See Also:


Attachments
Patch for bug in SimpleProfileRegistry.unescape(String) (994 bytes, patch)
2009-01-23 08:00 EST, Karel Brezina CLA
simon_kaegi: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karel Brezina CLA 2009-01-23 08:00:38 EST
Created attachment 123509 [details]
Patch for bug in SimpleProfileRegistry.unescape(String)

Method "org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.unescape(String)" cannot handle "more" complicated parameters, which have more then one "%" + ";" couples (e.g. "c%58;%47;tmp%47;ei_sa"). It causes "StringIndexOutOfBoundsException" exception.

I have the latest SimpleProfileRegistry.java from head, revision 1.49

Patch, which should be applied on "org.eclipse.equinox.internal.p2.engine" project, is enclosed.
Comment 1 Simon Kaegi CLA 2009-01-23 09:38:43 EST
Thanks Karel, good catch. Apparently "two" encoded characters would be a good idea in our test case.