Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-06-14 18:07:44 +0000
committerAlexander Kurtakov2020-06-14 18:51:52 +0000
commit30e7d2e92ceef3821e1f97d009382820c47f8a51 (patch)
tree2499e2a568e80337ad64ed7062545a49cf5cc206
parent8137f1290f1dfe526eca8388472464589102f426 (diff)
downloadrt.equinox.bundles-30e7d2e92ceef3821e1f97d009382820c47f8a51.tar.gz
rt.equinox.bundles-30e7d2e92ceef3821e1f97d009382820c47f8a51.tar.xz
rt.equinox.bundles-30e7d2e92ceef3821e1f97d009382820c47f8a51.zip
Bug 564247 - Update BREEs to 1.8 in equinox.bundlesI20200614-1800
Fix compile warnings. Change-Id: Id8adc2136c0915aa6209b7d4efc70691fb7a48bc Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/HttpContextExtensionService.java3
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/Activator.java1
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java4
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpServiceTracker.java28
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ResourceManager.java4
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java6
6 files changed, 24 insertions, 22 deletions
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 8322b8745..792f605fa 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 @@ package org.eclipse.equinox.http.registry;
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 @@ public interface HttpContextExtensionService {
* @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 7226aa800..efe968267 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.service.packageadmin.PackageAdmin;
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 b10fc91f4..4650dd51c 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 @@ public class FilterManager implements ExtensionPointTracker.Listener {
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 99617dd64..da7ec9a82 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.http.HttpService;
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 @@ public class HttpServiceTracker extends ServiceTracker {
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 @@ public class HttpServiceTracker extends ServiceTracker {
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 @@ public class HttpServiceTracker extends ServiceTracker {
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 6c83998b4..b29772336 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 @@ public class ResourceManager implements ExtensionPointTracker.Listener {
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 e6379a9c2..b2e357c16 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 @@ public class ServletManager implements ExtensionPointTracker.Listener {
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 @@ public class ServletManager implements ExtensionPointTracker.Listener {
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);

Back to the top