Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363374 - [metatype] The bundle providing the metadata must be resolved before any metadata is made available.
Summary: [metatype] The bundle providing the metadata must be resolved before any meta...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Juno   Edit
Assignee: John Ross CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 14:37 EST by John Ross CLA
Modified: 2011-11-21 10:35 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Ross CLA 2011-11-09 14:37:56 EST
The bundle providing the metadata (i.e. the bundle passed as an argument to MetaTypeService.getMetaTypeInformation()) must be resolved before the metatype impl will provide any metatype information based on metadata xml files contained within that bundle. This is because the impl now uses BundleWiring.findEntries(), and A BundleWiring only exists if the bundle is resolved. Previously, Bundle.findEntries() was used.

We should consider changing this back, as there does not appear to be any reason not to provide this metadata even if the bundle is not resolved.

Another issue with the current impl is that it will cache the MetaTypeInformation object created for the unresolved bundle. Consequently, even if another call is made once the bundle has resolved, the metadata will never show up.
Comment 1 Thomas Watson CLA 2011-11-09 15:28:34 EST
I agree, we should change back to using Bundle.findEntries.  If we did that then the issue of caching the object from unresolved bundles would not be and issue.
Comment 3 John Ross CLA 2011-11-21 08:24:18 EST
I missed a couple of places that still use BundleWiring.