Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350739 - composite bundle which has substitutable exports does not work
Summary: composite bundle which has substitutable exports does not work
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6.2+   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 345640
Blocks:
  Show dependency tree
 
Reported: 2011-06-29 14:47 EDT by Thomas Watson CLA
Modified: 2011-06-29 15:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2011-06-29 14:47:42 EDT
Opening bug to backport to 3.6.2+

+++ This bug was initially created as a clone of Bug #345640 +++

If a composite bundle exports and imports the same package things do not work as expected when the resolver chooses the composite to be the exporter of the package.  When ends up happening is we incorrectly create a surrogate that has metadata to export and import the package.  The resolver for the surrogate/composite framework then may choose to make the surrogate an importer or an exporter of the package.  Since the surrogate is at bundle id 0 it is very likely that it will be resolved first and given preference to be the exporter.

So now we have the composite bundle on the outside thinking it is the exporter of the package, and the surrogate on the inside thinking it is the exporter of the package, but meanwhile no one gets wired to the actual provider of the package, which must be from another bundle installed inside of the composite.
Comment 1 Thomas Watson CLA 2011-06-29 15:02:46 EDT
patch from https://bugs.eclipse.org/bugs/attachment.cgi?id=195623 applied successfully to 3.6.2+.  Patch released.