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

Bug 340899

Summary: Metatype service implementation ignores Bundle-Localization manifest header.
Product: [Eclipse Project] Equinox Reporter: John Ross <jwross>
Component: CompendiumAssignee: John Ross <jwross>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: unspecified   
Target Milestone: 3.7 M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 340874    
Attachments:
Description Flags
Proposed Patch tjwatson: iplog+

Description John Ross CLA 2011-03-24 15:16:39 EDT
Build Identifier: 

The Metatype service is required to follow the same localization mechanism described in the core spec unless overriden by the 'localization' attribute of the <MetaData> element. The default base name for property files is "OSGI-INF/l10n/bundle'; however, the core spec allows this to be overridden with the Bundle-Localization manifest header. The current implementation always uses the default base name and does not inspect the header.

Reproducible: Always
Comment 1 John Ross CLA 2011-03-24 16:41:15 EDT
Created attachment 191865 [details]
Proposed Patch

This patch updates the Metatype implementation so that the Bundle-Localization manifest header, when specified, will override the default base name. It also adds a new test to compendium.tests.
Comment 2 Thomas Watson CLA 2011-03-25 10:06:04 EDT
I released a modified patch:

- I created a static method for getting the bundle localization base
- I change the call to Bundle.getHeaders() to Bundle.getHeaders("") because we want the raw value of the Bundle-Localization header.
- I updated the AllTests class to include the new test suite.