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

Bug 325885

Summary: Dynamic import resolver bug
Product: [Eclipse Project] Equinox Reporter: Jeff McAffer <jeffmcaffer>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: anbharga, glyn.normington, jeffmcaffer
Version: 3.6.1   
Target Milestone: 3.6.2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 324618    
Bug Blocks: 325883    

Description Jeff McAffer CLA 2010-09-21 14:16:41 EDT
+++ This bug was initially created as a clone of Bug #324618 +++

A customer has observed some strange behaviour in the Equinox resolver (version 3.5.1.R35x_v20091005) and has spotted some code which may be to blame.

ResolverImpl line 1561 is:

resolverImports[j].setPossibleSuppliers(null))

rather than:

resolverImports[j].clearPossibleSuppliers()

and so possibleSuppliers in the array member is set to null, but selectedSupplierIndex is not set to 0 as well.

They say that, upon debugging, they ran into an issue where, in ResolverConstraint.selectNextSupplier(), the selectedSupplierIndex is not reset to 0 and, even if possibleSuppliers has values, selectNextSupplier returns false because selectedSupplierIndex is 1 (because it was not reset in the past) and possibleSuppliers.length is 1.

We don't have a (simple) testcase to reproduce, or indeed any way of reproducing the behaviour the customer consistently observes.

Assigning to Tom as he has already started to look at this.
Comment 1 Jeff McAffer CLA 2010-09-21 14:17:50 EDT
The patches and tests from the original bug have been committed to 3.6.x (post 3.6.1) and will be included in 3.6.2 on.