Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325955 - New warnings in build about generic APIs in OSGi
Summary: New warnings in build about generic APIs in OSGi
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Weaving (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 08:35 EDT by Thomas Watson CLA
Modified: 2010-12-08 09:23 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2010-09-22 08:35:17 EDT
1. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServicePlugin.java
 (at line 78)
final ServiceReference reference = context
ServiceReference is a raw type. References to generic type ServiceReference<S> should be parameterized
2. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServicePlugin.java
 (at line 81)
service = (DebugOptions) context.getService(reference);
Type safety: Unchecked invocation getService(ServiceReference) of the generic method getService(ServiceReference<S>) of type BundleContext
3. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServicePlugin.java
 (at line 81)
service = (DebugOptions) context.getService(reference);
Type safety: The expression of type ServiceReference needs unchecked conversion to conform to ServiceReference<Object>

1. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/Activator.java
 (at line 38)
private ServiceRegistration cachingServiceFactoryRegistration;
ServiceRegistration is a raw type. References to generic type ServiceRegistration<S> should be parameterized
2. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/Activator.java
 (at line 85)
final ServiceReference debugOptionsReference = bundleContext
ServiceReference is a raw type. References to generic type ServiceReference<S> should be parameterized
3. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/Activator.java
 (at line 88)
final DebugOptions debugOptions = (DebugOptions) bundleContext .getService(debugOptionsReference);
Type safety: Unchecked invocation getService(ServiceReference) of the generic method getService(ServiceReference<S>) of type BundleContext
4. WARNING in /src/org/eclipse/equinox/weaving/internal/caching/Activator.java
 (at line 89)
.getService(debugOptionsReference);
Type safety: The expression of type ServiceReference needs unchecked conversion to conform to ServiceReference<Object>
Comment 1 Thomas Watson CLA 2010-09-22 09:04:24 EDT
Need to be careful not to depend on newer methods on OSGi unless you want to have a dependency on the OSGi R4.3 specification.  Martin, I can work on a patch if you want me to.
Comment 2 Thomas Watson CLA 2010-12-08 09:23:05 EST
I released fixes for these warnings.