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

Bug 312500

Summary: Bad array index in MirrorApplication
Product: [Eclipse Project] Equinox Reporter: Peter Nehrer <pnehrer>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pascal, tjwatson
Version: 3.6   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Peter Nehrer CLA 2010-05-11 16:08:11 EDT
I've been trying to decypher the cmd line args for MirrorApplication and discovered the following dubious-looking code:

org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication, Line 275:

				VersionRange range = segments.length > 1 ? new VersionRange(segments[i]) : null;

I'd imagine the segments[i] should be segments[1]. In any case this doesn't work for the first element in the rootIUs array as you're referring to the IU's id and not the version range (which should follow the /, I guess).

This is from a 3.6M7 install.
Comment 1 Pascal Rapicault CLA 2010-05-11 21:44:59 EDT
Fixed in HEAD.
Comment 2 Thomas Watson CLA 2010-05-17 09:52:06 EDT
Is this in RC1 or RC2?  Please get the change reviewed.  Do not back out, just get it reviewed.