Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344631 - singleton selection algorithm incorrectly allows singleton collisions to resolve
Summary: singleton selection algorithm incorrectly allows singleton collisions to resolve
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 344567
  Show dependency tree
 
Reported: 2011-05-03 14:42 EDT by Thomas Watson CLA
Modified: 2011-05-03 23:15 EDT (History)
2 users (show)

See Also:
dj.houghton: review+


Attachments
Patch (7.96 KB, patch)
2011-05-03 16:50 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.