Bug 564247 - Update BREEs to 1.8 in equinox.bundles

Fix compile warnings.

Change-Id: Id8adc2136c0915aa6209b7d4efc70691fb7a48bc
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/HttpContextExtensionService.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/HttpContextExtensionService.java
index 8322b87..792f605 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/HttpContextExtensionService.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/HttpContextExtensionService.java
@@ -17,6 +17,7 @@
 
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
 
 /**
  * The HttpContextExtensionService provides access to an HttpContext instance whose resources and implementation
@@ -34,5 +35,5 @@
 	 * @return The HttpContext associated with the "id" and Http Service Reference; <code>null</code>
 	 *         if the HttpContext is unavailable.
 	 */
-	public HttpContext getHttpContext(ServiceReference httpServiceReference, String httpContextId);
+	public HttpContext getHttpContext(ServiceReference<HttpService> httpServiceReference, String httpContextId);
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/Activator.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/Activator.java
index 7226aa8..efe9682 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/Activator.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/Activator.java
@@ -21,6 +21,7 @@
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class Activator implements BundleActivator, ServiceTrackerCustomizer {
 
 	private ServiceTracker httpServiceTracker;
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java
index b10fc91..4650dd5 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java
@@ -52,9 +52,9 @@
 
 	private Map<IConfigurationElement, Filter> registered = new HashMap<>();
 
-	private ServiceReference reference;
+	private ServiceReference<?> reference;
 
-	public FilterManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) {
+	public FilterManager(HttpRegistryManager httpRegistryManager, ServiceReference<?> reference, IExtensionRegistry registry) {
 		this.httpRegistryManager = httpRegistryManager;
 		this.reference = reference;
 		tracker = new ExtensionPointTracker(registry, FILTERS_EXTENSION_POINT, this);
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpServiceTracker.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpServiceTracker.java
index 99617dd..da7ec9a 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpServiceTracker.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpServiceTracker.java
@@ -25,17 +25,17 @@
 import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.util.tracker.ServiceTracker;
 
-public class HttpServiceTracker extends ServiceTracker {
+public class HttpServiceTracker extends ServiceTracker<HttpService, HttpService> {
 
 	private BundleContext context;
 	private PackageAdmin packageAdmin;
 	private IExtensionRegistry registry;
 
-	private ServiceRegistration registration;
-	Map httpRegistryManagers = new HashMap();
+	private ServiceRegistration<?> registration;
+	Map<ServiceReference<HttpService>, HttpRegistryManager> httpRegistryManagers = new HashMap<>();
 
 	public HttpServiceTracker(BundleContext context, PackageAdmin packageAdmin, IExtensionRegistry registry) {
-		super(context, HttpService.class.getName(), null);
+		super(context, HttpService.class, null);
 		this.context = context;
 		this.packageAdmin = packageAdmin;
 		this.registry = registry;
@@ -52,8 +52,8 @@
 		super.close();
 	}
 
-	public synchronized Object addingService(ServiceReference reference) {
-		HttpService httpService = (HttpService) super.addingService(reference);
+	public synchronized HttpService addingService(ServiceReference<HttpService> reference) {
+		HttpService httpService = super.addingService(reference);
 		if (httpService == null)
 			return null;
 
@@ -64,25 +64,25 @@
 		return httpService;
 	}
 
-	public void modifiedService(ServiceReference reference, Object service) {
+	public void modifiedService(ServiceReference<HttpService> reference, HttpService service) {
 		// ignored
 	}
 
-	public synchronized void removedService(ServiceReference reference, Object service) {
-		HttpRegistryManager httpRegistryManager = (HttpRegistryManager) httpRegistryManagers.remove(reference);
+	public synchronized void removedService(ServiceReference<HttpService> reference, HttpService service) {
+		HttpRegistryManager httpRegistryManager = httpRegistryManagers.remove(reference);
 		if (httpRegistryManager != null) {
 			httpRegistryManager.stop();
 		}
 		super.removedService(reference, service);
 	}
 
-	public class HttpContextExtensionServiceFactory implements ServiceFactory {
+	public class HttpContextExtensionServiceFactory implements ServiceFactory<HttpContextExtensionService> {
 
-		public Object getService(Bundle bundle, ServiceRegistration registration) {
+		public HttpContextExtensionService getService(Bundle bundle, ServiceRegistration<HttpContextExtensionService> registration) {
 			return new HttpContextExtensionServiceImpl(bundle);
 		}
 
-		public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
+		public void ungetService(Bundle bundle, ServiceRegistration<HttpContextExtensionService> registration, HttpContextExtensionService service) {
 			// do nothing
 		}
 	}
@@ -95,9 +95,9 @@
 			this.bundle = bundle;
 		}
 
-		public HttpContext getHttpContext(ServiceReference httpServiceReference, String httpContextId) {
+		public HttpContext getHttpContext(ServiceReference<HttpService> httpServiceReference, String httpContextId) {
 			synchronized (HttpServiceTracker.this) {
-				HttpRegistryManager httpRegistryManager = (HttpRegistryManager) httpRegistryManagers.get(httpServiceReference);
+				HttpRegistryManager httpRegistryManager = httpRegistryManagers.get(httpServiceReference);
 				if (httpRegistryManager == null)
 					return null;
 
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ResourceManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ResourceManager.java
index 6c83998..b297723 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ResourceManager.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ResourceManager.java
@@ -46,9 +46,9 @@
 
 	private HttpRegistryManager httpRegistryManager;
 
-	private ServiceReference reference;
+	private ServiceReference<?> reference;
 
-	public ResourceManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) {
+	public ResourceManager(HttpRegistryManager httpRegistryManager, ServiceReference<?> reference, IExtensionRegistry registry) {
 		this.httpRegistryManager = httpRegistryManager;
 		this.reference = reference;
 		tracker = new ExtensionPointTracker(registry, RESOURCES_EXTENSION_POINT, this);
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java
index e6379a9..b2e357c 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java
@@ -53,9 +53,9 @@
 
 	private List<IConfigurationElement> registered = new ArrayList<>();
 
-	private ServiceReference reference;
+	private ServiceReference<?> reference;
 
-	public ServletManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) {
+	public ServletManager(HttpRegistryManager httpRegistryManager, ServiceReference<?> reference, IExtensionRegistry registry) {
 		this.httpRegistryManager = httpRegistryManager;
 		this.reference = reference;
 		tracker = new ExtensionPointTracker(registry, SERVLETS_EXTENSION_POINT, this);
@@ -116,7 +116,7 @@
 			if (alias == null)
 				continue; // alias is mandatory - ignore this.
 
-			Dictionary initparams = new Hashtable();
+			Dictionary<String, String> initparams = new Hashtable<>();
 			IConfigurationElement[] initParams = servletElement.getChildren(INIT_PARAM);
 			for (int j = 0; j < initParams.length; ++j) {
 				String paramName = initParams[j].getAttribute(PARAM_NAME);