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

Bug 327174

Summary: Update Metatype service source code to use jsr14 and generics.
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 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
JSR14 and Generics Support for Metatype
tjwatson: iplog+
patch to stop using package admin none

Description John Ross CLA 2010-10-07 01:13:50 EDT
Build Identifier: 

The Metatype service code should be updated to use the -target jsr14 compile option and generics in conjunction with OSGi 4.3.


Reproducible: Always
Comment 1 John Ross CLA 2010-10-12 15:37:27 EDT
Created attachment 180707 [details]
JSR14 and Generics Support for Metatype

Adds jsr14 support.

Adds support for generics. As part of this work, the ObjectClassDefinitionImpl.addAddtributeDefinition method signature was updated. I believe this method should be package-private but did not change the visibility. There are two remaining warnings since the LogService does not currently support generics.

Updates required execution environment to J2SE-1.5, OSGi/Minimum-1.2.

Removes deprecated export service header.

Removes unused _dfts_vector variable from AttributeDefinitionImpl.

Removes unnecessary throws clauses for SAXException causing numerous warnings.

Per discussions with Tom, removes reflection code for dealing with BigInteger and BigDecimal and replaces with direct class access since the target is now OSGi/Minimum-1.2.

Adds versions to the imported packages, with the exception of XML related packages, within the manifest. The versions for ConfigAdmin and Metatype imports will need to be changed once the org.eclipse.osgi.services project is updated.

Updates the bundle version to 1.1.0.

Updates java source copyrights where necessary. Does the value of the bundleCopyright property within plugin.properties need to be updated as well?
Comment 2 Thomas Watson CLA 2010-10-13 16:15:51 EDT
I will to review patch.  Thanks John.
Comment 3 Thomas Watson CLA 2010-10-13 17:00:40 EDT
Created attachment 180830 [details]
patch to stop using package admin

This patch updates FragmentUtils to no longer use PackageAdmin.  Additional work could be done to use BundleWiring.findEntries instead of using getEntryPaths on each fragment to search over fragments.  But we likely should do additional clean up in other bugs.  For example, the use of Vector and Hashtable should be replaced by List and Map etc.  We should also consider use DS to register the service similar to how event admin impl does.

I also changed both addAttributeDefinition and setIcon on ObjectClassDefinitionImpl to be package private.  John, please review my changes.  We should use other bugs to do any other clean up.  Thanks.
Comment 4 John Ross CLA 2010-10-13 19:57:10 EDT
(In reply to comment #3)
> John, please review my changes.

I see no issues.
Comment 5 Thomas Watson CLA 2010-10-18 11:27:00 EDT
Patch released.  Thanks for the patch and review John.