Bug 418661 - [Metadata] Get rid of compile warnings in official build
Fix warnings in org.eclipse.e4.core.di
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/internal/di/osgi/DIActivator.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/internal/di/osgi/DIActivator.java
index f0266e6..f35f156 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/internal/di/osgi/DIActivator.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/internal/di/osgi/DIActivator.java
@@ -20,8 +20,8 @@
static private DIActivator defaultInstance;
private BundleContext bundleContext;
- private ServiceTracker debugTracker = null;
- private ServiceTracker logTracker = null;
+ private ServiceTracker<DebugOptions, DebugOptions> debugTracker = null;
+ private ServiceTracker<FrameworkLog, FrameworkLog> logTracker = null;
public DIActivator() {
defaultInstance = this;
@@ -54,10 +54,10 @@
public boolean getBooleanDebugOption(String option, boolean defaultValue) {
if (debugTracker == null) {
- debugTracker = new ServiceTracker(bundleContext, DebugOptions.class.getName(), null);
+ debugTracker = new ServiceTracker<DebugOptions, DebugOptions>(bundleContext, DebugOptions.class, null);
debugTracker.open();
}
- DebugOptions options = (DebugOptions) debugTracker.getService();
+ DebugOptions options = debugTracker.getService();
if (options != null) {
String value = options.getOption(option);
if (value != null)
@@ -70,10 +70,10 @@
if (logTracker == null) {
if (bundleContext == null)
return null;
- logTracker = new ServiceTracker(bundleContext, FrameworkLog.class.getName(), null);
+ logTracker = new ServiceTracker<FrameworkLog, FrameworkLog>(bundleContext, FrameworkLog.class, null);
logTracker.open();
}
- return (FrameworkLog) logTracker.getService();
+ return logTracker.getService();
}
}