| Summary: | Update Event Admin source code to use jsr14 and generics. | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | John Ross <jwross> | ||||||||||||
| Component: | Compendium | Assignee: | equinox.compendium-inbox <equinox.compendium-inbox> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | hargrave | ||||||||||||
| Version: | unspecified | ||||||||||||||
| Target Milestone: | 3.7 M3 | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
John Ross
Created attachment 180010 [details]
Patch for jsr14 and generics.
Adds support for jsr14.
Adds generic information. There are two remaining warnings on the LogTracker because the LogService does not yet support generics. I don't know how to get rid of these until that happens other than suppressing them, which I don't think we want to do.
Removes and replaces deprecated code related to changes to org.eclipse.osgi.framework.eventmgr.* within EventAdminImpl.dispatchEvent.
Updates the manifest to specify versions for imported packages and remove the deprecated export service header.
(In reply to comment #1) > Patch for jsr14 and generics. > > Adds support for jsr14. Skimmed the patch. Looks good. I would like to see the adapters changes to avoid the use of Hashtable/Dictionary in favor of Map (using the Event constructor which takes a Map argument.) Can you update the patch? > > There are two remaining warnings on the LogTracker > because the LogService does not yet support generics. I don't know how to get > rid of these until that happens other than suppressing them, which I don't > think we want to do. I think we don't worry about those for now. I guess I should update the remainder of the OSGi API to generics... Created attachment 180216 [details] Patch 2 for jsr14 and generics Incorporates adapter changes to use Map in favor of Dictionary/Hashtable as requested in comment #2. Created attachment 180218 [details]
Patch 3 for jsr14 and generics
Forgot to check patch as the content type for patch 2.
Created attachment 180220 [details] Patch with comment 2 changes Not exactly sure why the second patch is more than twice the size of the first, but, if more convenient, here's a patch containing only the classes that changed since the first based on comment #2. Marked all but one patch as obsolete. Why does .classpath refer to /org.osgi.service.log? This should be picked up by the PDE classpath container (org.eclipse.pde.core.requiredPlugins). [Patch is bigger because jdt.core.prefs got reorganized so the diff is much larger.] Hastable is replaced with a HashMap wrapped in a synchronizedMap. Does it really need to be synchronized? I don't think it does as the Map is just used to create the Event and the Event does not hold onto the Map. (In reply to comment #6) > Marked all but one patch as obsolete. > Why does .classpath refer to /org.osgi.service.log? This should be picked up by > the PDE classpath container (org.eclipse.pde.core.requiredPlugins). Sorry, didn't mean to include that. That was for other work and my temporary way of quickly getting the project to compile against the latest stuff from the OSGi master branch. > Hastable is replaced with a HashMap wrapped in a synchronizedMap. Does it > really need to be synchronized? I don't think it does as the Map is just used > to create the Event and the Event does not hold onto the Map. I agree. I failed to look at the Event source to see what it actually did with the Map and unwittingly assumed it kept the original. I'll provide an updated patch. Created attachment 180257 [details] Patch 4 for jsr14 and generics Incorporates comment #6. Release patch 4 with a minor change to bump the bundles version number to 1.2.1. Thanks John. |