Fix Eclipse warnings in config-manager
[controller.git] / opendaylight / config / config-manager / src / main / java / org / opendaylight / controller / config / manager / impl / osgi / ConfigManagerActivator.java
index 1d8c3bbc30bff75a5f41d51dd5af2e06ca919dff..a5d77eabe014bc60ca5ecf162f41ac7e8ea4dbe2 100644 (file)
@@ -74,18 +74,11 @@ public class ConfigManagerActivator implements BundleActivator, SynchronousBundl
             final ModuleFactoryBundleTracker moduleFactoryTracker = new ModuleFactoryBundleTracker(
                     blankTransactionServiceTracker);
 
-            final boolean scanResolvedBundlesForModuleInfo = true;
-            BundleTracker<Collection<ObjectRegistration<YangModuleInfo>>> moduleInfoResolvedBundleTracker = null;
-            ExtensibleBundleTracker<?> moduleFactoryBundleTracker;
-            if(scanResolvedBundlesForModuleInfo) {
-                moduleInfoResolvedBundleTracker = new BundleTracker<>(context, Bundle.RESOLVED | Bundle.STARTING |
-                            Bundle.STOPPING | Bundle.ACTIVE, moduleInfoBundleTracker);
-                moduleFactoryBundleTracker = new ExtensibleBundleTracker<>(context, moduleFactoryTracker);
-            } else {
-                moduleFactoryBundleTracker = new ExtensibleBundleTracker<>(context,
-                        moduleFactoryTracker, moduleInfoBundleTracker);
-            }
-
+            BundleTracker<Collection<ObjectRegistration<YangModuleInfo>>> moduleInfoResolvedBundleTracker =
+                    new BundleTracker<>(context, Bundle.RESOLVED | Bundle.STARTING | Bundle.STOPPING | Bundle.ACTIVE,
+                            moduleInfoBundleTracker);
+            ExtensibleBundleTracker<?> moduleFactoryBundleTracker = new ExtensibleBundleTracker<>(context,
+                    moduleFactoryTracker);
             moduleInfoBundleTracker.open(moduleInfoResolvedBundleTracker);
 
             // start extensible tracker
@@ -156,7 +149,7 @@ public class ConfigManagerActivator implements BundleActivator, SynchronousBundl
 
         // If the system bundle (id 0) is stopping close the ConfigRegistry so it destroys all modules. On
         // shutdown the system bundle is stopped first.
-        if((event.getBundle().getBundleId() == SYSTEM_BUNDLE_ID) && (event.getType() == BundleEvent.STOPPING)) {
+        if(event.getBundle().getBundleId() == SYSTEM_BUNDLE_ID && event.getType() == BundleEvent.STOPPING) {
             this.configRegistry.close();
         }
     }