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

Bug 344631

Summary: singleton selection algorithm incorrectly allows singleton collisions to resolve
Product: [Eclipse Project] Equinox Reporter: Thomas Watson <tjwatson>
Component: FrameworkAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, glyn.normington
Version: 3.7Flags: dj.houghton: review+
Target Milestone: 3.7 RC1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 344567    
Attachments:
Description Flags
Patch none

Description Thomas Watson CLA 2011-05-03 14:42:31 EDT
A resolver hook can be used to allow multiple versions of a singleton bundle to resolve.  This is done by allowing a resolver hook to remove collision candidates from the perspective of one singleton bundle at a time.  Imagine 2 singleton bundles B1 and B2.  A resolver hook may choose to make B1 a collision candidate for B2 but NOT make B2 a collision candidate for B1.

In this case, the algorithm used will allow both B1 and B2 to resolve which is incorrect.  It cannot allow both of them to resolve because that will violate the rule that says B1 collides with B2.
Comment 1 Thomas Watson CLA 2011-05-03 16:50:19 EDT
Created attachment 194648 [details]
Patch

Unfortunately to fix this I had to rewrite much of the singleton selection algorithm.
Comment 2 Thomas Watson CLA 2011-05-03 16:51:06 EDT
DJ I need you to review this.  Please ping me when you want to discuss.
Comment 3 Thomas Watson CLA 2011-05-03 23:12:18 EDT
patch released.