Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340874 - Metadata info in org.eclipse.equinox.http.jetty6 does not display correctly.
Summary: Metadata info in org.eclipse.equinox.http.jetty6 does not display correctly.
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: John Ross CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 340899
Blocks:
  Show dependency tree
 
Reported: 2011-03-24 11:29 EDT by John Ross CLA
Modified: 2011-03-28 16:34 EDT (History)
3 users (show)

See Also:


Attachments
Proposed Patch (12.48 KB, patch)
2011-03-24 11:39 EDT, John Ross CLA
no flags Details | Diff
Alternate Patch (7.31 KB, patch)
2011-03-24 17:52 EDT, John Ross CLA
tjwatson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Ross CLA 2011-03-24 11:29:05 EDT
Build Identifier: 

When displayed in a console that supports the Metatype service specification, such as the Apache Web Console, the metadata shows 'null' for all attribute names and descriptions. Also, the OCD name and description are displayed as the localization key, not the localized value.

Reproducible: Always
Comment 1 John Ross CLA 2011-03-24 11:39:08 EDT
Created attachment 191836 [details]
Proposed Patch

The localization properties (configurationName and configurationDescription) that existed were placed in plugin.properties, but the "localization" attribute on the <MetaData> element was not specified. By default, properties are searched for in OSGI-INF/l10n/bundle*.properties, which didn't exist. One option was to continue to use plugin.properties and add the "localization" attribute with the appropriate value. Instead, I chose to follow the more standard option of using OSGI-INF/l10n.

The two localization properties within plugin.properties were moved to OSGI-INF/l10n/bundle.properties.

No names or descriptions were specified on any of the attribute definitions. These were added and localized. New defaults were added where possible in order to avoid cardinality=1 and processing attributes as Object[]. A few attributes did not have reasonable defaults. For these, the code was updated to process them as Object[].

Made <Designate> ocdref and <OCD> id the same as <Designate> pid and factorypid as a workaround to a known Apache Web console issue (see https://issues.apache.org/jira/browse/FELIX-1865?focusedCommentId=13010698&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13010698). This was possible because multiple designates do not need to reference the same ocd. If that becomes necessary, the web console issue is unavoidable.
Comment 2 John Ross CLA 2011-03-24 11:44:35 EDT
Simon, cc'ing you because it might be worthwhile for you to review, particularly the added defaults.

Brian, cc'ing you as the original reporter of this issue.
Comment 3 Simon Kaegi CLA 2011-03-24 13:58:28 EDT
Thanks John,

I took a quick glance and am a bit concerned about the change from String to String[] and if that will affect existing usage. Talking and traveling today, but will take a deeper look Monday.
Comment 4 Thomas Watson CLA 2011-03-24 14:08:26 EDT
Simon, don't spend too much time looking at this.  John needs to attach another patch because there is actually a bug in the equinox metatype impl that was causing it to not use the NLS values from the plugin.properties file.

I am also concerned about the String[] vs String changes.  It seems the metadata is incorrectly allowing multiple values for the cardinality in these cases.  The Cardinality likely should be 1 for everything in the metadata.
Comment 5 John Ross CLA 2011-03-24 17:52:25 EDT
Created attachment 191875 [details]
Alternate Patch

This alternate patch changes the cardinality to zero for the remaining three attribute definitions whose cardinality was one. This ensures none of the values will be delivered as scalars, not arrays or vectors. There are no necessary code changes with this approach.

Also, this patch puts all the localization properties into the plugin.properties file, which is referenced in the Bundle-Localization manifest header.

Note this patch depends on the one attached to Bug 340899.
Comment 6 Thomas Watson CLA 2011-03-25 10:13:40 EDT
I released this patch.  I also updated the bundle version of jetty6.  I am surprised the version has not increased since the 3.4 release.  I know we have released bug fixes to this bundle since then.
Comment 7 Simon Kaegi CLA 2011-03-28 15:55:18 EDT
(In reply to comment #6)
> ... I am
> surprised the version has not increased since the 3.4 release.  I know we have
> released bug fixes to this bundle since then.

Me too. I wonder if what we're seeing is a bit artificial because this bundle went live in 3.5 and so perhaps was not an entirely good citizen in terms of manifest version numbering.
Comment 8 Thomas Watson CLA 2011-03-28 16:34:23 EDT
See bug310466 and the fallout in bug341031 as a result of me updating this version.  Well it is fixed now. ;-)