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

Bug 330295

Summary: [ds] remove unnecessary dependency on org.osgi.service.metatype package
Product: [Eclipse Project] Equinox Reporter: John Ross <jwross>
Component: CompendiumAssignee: Stoyan Boshev <s.boshev>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: s.boshev, sja.eclipse, tjwatson
Version: unspecifiedFlags: tjwatson: review+
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch none

Description John Ross CLA 2010-11-15 17:23:05 EST
Build Identifier: 

See Bug 327173.

Reproducible: Always
Comment 1 Simon Archer CLA 2010-11-15 17:43:42 EST
John, can you please provide some pointers to examples of this in DS XML? Failing that, some additional background.  Cheers buddy.
Comment 2 John Ross CLA 2010-11-16 20:06:39 EST
This bug may be a red herring. The component description XML schema declares the following:

<simpleType name="Tjava-types">
     <restriction base="string">
          <enumeration value="String" />
          <enumeration value="Long" />
          <enumeration value="Double" />
          <enumeration value="Float" />
          <enumeration value="Integer" />
          <enumeration value="Byte" />
          <enumeration value="Character" />
          <enumeration value="Boolean" />
          <enumeration value="Short" />
     </restriction>
</simpleType>

Although seemingly inspired by the MetaType specification, I see no direct connection discussed within the DS specification.

It appears the Equinox DS implementation simply chose to reference the MetaType AttributionDefinition types for convenience. I do not see that a change to the MetaType specification necessarily implies a change here. The DS specification itself would need to change, and it's not clear that a Password type would have any value within this context.

Simon, the bug that started it all may be found here: https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1643. There are no associated RFCs. Here's the relevant 4.3 JavaDoc:

/**
 * The {@code PASSWORD} (12) type.
 * 
 * Attributes of this type must be stored as {@code String}, {@code Vector}
 * with {@code String} or {@code String[]} objects depending on {link
 * getCardinality()}. A {@code PASSWORD} must be treated as a string but the
 * type can be used to disguise the information when displayed to a user to
 * prevent others from seeing it.
 * 
 * @since 1.2
 */
int	PASSWORD	= 12;
Comment 3 Thomas Watson CLA 2010-11-17 08:31:49 EST
Renaming bug title.  I think we should remove this unnecessary dependency on the org.osgi.service.metatype package simply to obtain constants that are not related to DS.
Comment 4 Stoyan Boshev CLA 2010-11-17 11:38:43 EST
Yes, we should remove the dependency on org.osgi.service.metatype package
Comment 5 Stoyan Boshev CLA 2010-12-06 09:57:28 EST
Created attachment 184607 [details]
proposed patch
Comment 6 Thomas Watson CLA 2010-12-06 10:02:06 EST
We should release this for M4.
Comment 7 Stoyan Boshev CLA 2010-12-06 10:11:03 EST
Patch is released to HEAD