Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332650 - Bundle find hook should govern BundleContext.getBundle(id)
Summary: Bundle find hook should govern BundleContext.getBundle(id)
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 330776
  Show dependency tree
 
Reported: 2010-12-15 11:02 EST by Glyn Normington CLA
Modified: 2011-01-07 11:42 EST (History)
1 user (show)

See Also:


Attachments
patch (15.83 KB, patch)
2010-12-15 15:33 EST, 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 Glyn Normington CLA 2010-12-15 11:02:13 EST
The javadoc for the find book says BundleContext.getBundle(id) *is* governed by the find hook.
Comment 1 Thomas Watson CLA 2010-12-15 15:33:49 EST
Created attachment 185265 [details]
patch

This patch fixes the issue.  The actual behavior is a simple fix.  But the ramifications ended up being a bit tricky.  There was quite a few places in the framework that assumed the system BundleContext.getBundle(id) would return a bundle object without any chance of a find hook filtering it out.

This patch fixes all places in the framework that called BC.getBundle(id) except for the framework console commands and the composite support.  Eventually the composite support will go away.  The framework console support we want to allow filtering.

I still have a bit of code that makes the system bundle context special WRT to BC.getBundle(id).  My fear is that equinox framework hook implementations may be depending on the same behavior.  I don't want to all of a sudden break them.
Comment 2 Thomas Watson CLA 2010-12-15 15:35:21 EST
Patch released.