X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2Fosgi%2FBeanToOsgiServiceManager.java;fp=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2Fosgi%2FBeanToOsgiServiceManager.java;h=ff504dafdcac22176d798569836bfe6e5ce460c7;hp=51f99403148ba7b40301e52b63b391ae98c0134e;hb=cbcc2b61265e903959f11d44c292771e76b3926e;hpb=e2f5a1f1f1b917620ba4ade6c024f5ee3d202036
diff --git a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BeanToOsgiServiceManager.java b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BeanToOsgiServiceManager.java
index 51f9940314..ff504dafdc 100644
--- a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BeanToOsgiServiceManager.java
+++ b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BeanToOsgiServiceManager.java
@@ -34,9 +34,9 @@ public class BeanToOsgiServiceManager {
* It is expected that before using this method OSGi service registry will
* be cleaned from previous registrations.
*/
- public OsgiRegistration registerToOsgi(AutoCloseable instance, ModuleIdentifier moduleIdentifier,
- BundleContext bundleContext,
- Map serviceNamesToAnnotations) {
+ public OsgiRegistration registerToOsgi(final AutoCloseable instance, final ModuleIdentifier moduleIdentifier,
+ final BundleContext bundleContext,
+ final Map serviceNamesToAnnotations) {
return new OsgiRegistration(instance, moduleIdentifier, bundleContext, serviceNamesToAnnotations);
}
@@ -51,17 +51,17 @@ public class BeanToOsgiServiceManager {
@GuardedBy("this")
private final Map serviceNamesToAnnotations;
- public OsgiRegistration(AutoCloseable instance, ModuleIdentifier moduleIdentifier,
- BundleContext bundleContext,
- Map serviceNamesToAnnotations) {
+ public OsgiRegistration(final AutoCloseable instance, final ModuleIdentifier moduleIdentifier,
+ final BundleContext bundleContext,
+ final Map serviceNamesToAnnotations) {
this.instance = instance;
this.moduleIdentifier = moduleIdentifier;
this.serviceNamesToAnnotations = serviceNamesToAnnotations;
this.serviceRegistrations = registerToSR(instance, bundleContext, serviceNamesToAnnotations);
}
- private static Set> registerToSR(AutoCloseable instance, BundleContext bundleContext,
- Map serviceNamesToAnnotations) {
+ private static Set> registerToSR(final AutoCloseable instance, final BundleContext bundleContext,
+ final Map serviceNamesToAnnotations) {
Set> serviceRegistrations = new HashSet<>();
for (Entry entry : serviceNamesToAnnotations.entrySet()) {
ServiceInterfaceAnnotation annotation = entry.getKey();
@@ -87,15 +87,15 @@ public class BeanToOsgiServiceManager {
for (ServiceRegistration> serviceRegistration : serviceRegistrations) {
try {
serviceRegistration.unregister();
- } catch(IllegalStateException e) {
+ } catch(final IllegalStateException e) {
LOG.trace("Cannot unregister {}", serviceRegistration, e);
}
}
serviceRegistrations.clear();
}
- public synchronized void updateRegistrations(Map newAnnotationMapping,
- BundleContext bundleContext, AutoCloseable newInstance) {
+ public synchronized void updateRegistrations(final Map newAnnotationMapping,
+ final BundleContext bundleContext, final AutoCloseable newInstance) {
boolean notEquals = !this.instance.equals(newInstance);
notEquals |= !newAnnotationMapping.equals(serviceNamesToAnnotations);
if (notEquals) {
@@ -110,7 +110,7 @@ public class BeanToOsgiServiceManager {
}
}
- private static Dictionary createProps(String serviceName) {
+ private static Dictionary createProps(final String serviceName) {
Hashtable result = new Hashtable<>();
result.put(SERVICE_NAME_OSGI_PROP, serviceName);
return result;