Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344767 - Provide case-insensitive way to parse/access manifest headers
Summary: Provide case-insensitive way to parse/access manifest headers
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 344763
  Show dependency tree
 
Reported: 2011-05-04 17:20 EDT by Curtis Windatt CLA
Modified: 2018-11-26 10:14 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2011-05-04 17:20:14 EDT
In a number of places in PDE we call ManifestElement.parseBundleManifest(InputStream manifest, Map<String, String> headers) to get the headers of a bundle we are looking at.  In some cases we pass in a hashtable and in others we pass null.

In either case the returned map does not allow us to look up headers in a case-insensitive way.  Headers are supposed to be case-insensitive and generated manifests can easily have all lower case names.

PDE has previously worked around this issue for syntax highlighting (bug
151172), but applying the same workaround throughout PDE will be difficult.  A better API method would allow us to fix this throughout PDE (bug 344763)
Comment 1 Thomas Watson CLA 2011-05-05 09:13:38 EDT
I was thinking of adding a ManifestElement.parseBundleManifest(InputStream manifest) method that took no map argument and returns a case-insensitive key Map implementation.
Comment 2 Glyn Normington CLA 2011-05-05 09:27:56 EDT
Note that the Virgo utilities git repository has a fully-fledged manifest parser with the case-insensitivity built in plus the ability to manipulate and generate manifests.

Starting point if you want to take a peek at the code: http://virgo-opengrok.springsource.org/xref/virgo/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/src/main/java/org/eclipse/virgo/util/osgi/manifest/internal/StandardBundleManifest.java

git project containing the parser: git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.util.git
Comment 3 Thomas Watson CLA 2011-06-08 11:30:18 EDT
Move all 3.8 bugs to Juno.
Comment 4 Thomas Watson CLA 2012-02-29 12:13:39 EST
Dropping from Juno.
Comment 5 Eclipse Genie CLA 2018-11-21 12:34:56 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Thomas Watson CLA 2018-11-26 10:14:55 EST
If you want case insensitive lookups then pass a Map that does that to the parseBundleManifest method.