From 4b09e8c7e2813c45393c769401702648ca412e0d Mon Sep 17 00:00:00 2001 From: Eclipse Equinox Bot Date: Thu, 30 Jan 2025 02:47:16 +0000 Subject: [PATCH] Perform clean code of bundles/org.eclipse.equinox.http.registry --- .../internal/DefaultRegistryHttpContext.java | 6 ++--- .../http/registry/internal/FilterManager.java | 10 ++++----- .../registry/internal/HttpContextManager.java | 6 ++--- .../internal/HttpRegistryManager.java | 22 +++++++++---------- .../registry/internal/HttpServiceTracker.java | 6 ++--- .../registry/internal/ResourceManager.java | 8 +++---- .../registry/internal/ServletManager.java | 10 ++++----- 7 files changed, 34 insertions(+), 34 deletions(-) diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java index 3bd22b7f39c..c4f96584bc1 100644 --- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java +++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java @@ -22,7 +22,7 @@ import org.osgi.service.http.HttpContext; public class DefaultRegistryHttpContext implements HttpContext { - private HttpContext delegate; + private final HttpContext delegate; private List resourceMappings; private Properties mimeMappings; @@ -93,8 +93,8 @@ public Set getResourcePaths(String path) { } public static class ResourceMapping { - private Bundle bundle; - private String bundlePath; + private final Bundle bundle; + private final String bundlePath; public ResourceMapping(Bundle bundle, String path) { this.bundle = bundle; 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 d31158b98f8..e56157a3f4c 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 @@ -46,13 +46,13 @@ public class FilterManager implements ExtensionPointTracker.Listener { private static final String FILTER = "filter"; //$NON-NLS-1$ - private ExtensionPointTracker tracker; + private final ExtensionPointTracker tracker; - private HttpRegistryManager httpRegistryManager; + private final HttpRegistryManager httpRegistryManager; - private Map registered = new HashMap<>(); + private final Map registered = new HashMap<>(); - private ServiceReference reference; + private final ServiceReference reference; public FilterManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) { @@ -154,7 +154,7 @@ public void removed(IExtension extension) { private static class FilterWrapper implements Filter { - private IConfigurationElement element; + private final IConfigurationElement element; private Filter delegate; private FilterConfig config; private boolean loadOnStartup = false; diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java index 9a589da802b..48f46bc460b 100644 --- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java +++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java @@ -37,9 +37,9 @@ public class HttpContextManager implements Listener { private static final String RESOURCEMAPPING = "resource-mapping"; //$NON-NLS-1$ private static final String BUNDLE = "bundle"; //$NON-NLS-1$ - private List registered = new ArrayList<>(); - private HttpRegistryManager httpRegistryManager; - private ExtensionPointTracker tracker; + private final List registered = new ArrayList<>(); + private final HttpRegistryManager httpRegistryManager; + private final ExtensionPointTracker tracker; public HttpContextManager(HttpRegistryManager httpRegistryManager, IExtensionRegistry registry) { this.httpRegistryManager = httpRegistryManager; diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java index 7eb39ad4902..2ea57d551d8 100644 --- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java +++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java @@ -83,17 +83,17 @@ public HttpContextContribution(HttpContext context, IContributor contributor) { } } - private HttpContextManager httpContextManager; - private ServletManager servletManager; - private FilterManager filterManager; - private ResourceManager resourceManager; - private HttpService httpService; - private PackageAdmin packageAdmin; - private Map contexts = new HashMap<>(); - private Map filters = new HashMap<>(); - private Map servlets = new HashMap<>(); - private Map resources = new HashMap<>(); - private Set registered = new HashSet<>(); + private final HttpContextManager httpContextManager; + private final ServletManager servletManager; + private final FilterManager filterManager; + private final ResourceManager resourceManager; + private final HttpService httpService; + private final PackageAdmin packageAdmin; + private final Map contexts = new HashMap<>(); + private final Map filters = new HashMap<>(); + private final Map servlets = new HashMap<>(); + private final Map resources = new HashMap<>(); + private final Set registered = new HashSet<>(); public HttpRegistryManager(ServiceReference reference, HttpService httpService, PackageAdmin packageAdmin, IExtensionRegistry registry) { 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 e2bad7bd46e..51fb6dfd9b2 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 @@ -27,8 +27,8 @@ public class HttpServiceTracker extends ServiceTracker { - private PackageAdmin packageAdmin; - private IExtensionRegistry registry; + private final PackageAdmin packageAdmin; + private final IExtensionRegistry registry; private ServiceRegistration registration; Map, HttpRegistryManager> httpRegistryManagers = new HashMap<>(); @@ -98,7 +98,7 @@ public void ungetService(Bundle bundle, ServiceRegistration registered = new ArrayList<>(); + private final List registered = new ArrayList<>(); - private HttpRegistryManager httpRegistryManager; + private final HttpRegistryManager httpRegistryManager; - private ServiceReference reference; + private final ServiceReference reference; public ResourceManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) { 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 8c41fc99e3f..5998454128b 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 @@ -47,13 +47,13 @@ public class ServletManager implements ExtensionPointTracker.Listener { private static final String FILTER = "filter"; //$NON-NLS-1$ - private ExtensionPointTracker tracker; + private final ExtensionPointTracker tracker; - private HttpRegistryManager httpRegistryManager; + private final HttpRegistryManager httpRegistryManager; - private List registered = new ArrayList<>(); + private final List registered = new ArrayList<>(); - private ServiceReference reference; + private final ServiceReference reference; public ServletManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) { @@ -155,7 +155,7 @@ public void removed(IExtension extension) { } private static class ServletWrapper implements Servlet { - private IConfigurationElement element; + private final IConfigurationElement element; private Servlet delegate; private ServletConfig config; private boolean loadOnStartup = false;