Fix (and suppress) some static code analysis warnings in blueprint
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / BlueprintContainerRestartServiceImpl.java
index f3010a41387d21d4765b33309b9c45713270c7c1..7985c5bce00e2090016986394bc17287033b866e 100644 (file)
@@ -131,8 +131,9 @@ class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintCo
         // restart config modules.
         final CountDownLatch containerCreationComplete = new CountDownLatch(containerBundles.size());
         ServiceRegistration<?> eventHandlerReg = registerEventHandler(forBundle.getBundleContext(), event -> {
         // restart config modules.
         final CountDownLatch containerCreationComplete = new CountDownLatch(containerBundles.size());
         ServiceRegistration<?> eventHandlerReg = registerEventHandler(forBundle.getBundleContext(), event -> {
-            LOG.debug("handleEvent {} for bundle {}", event.getTopic(), event.getProperty(EventConstants.BUNDLE));
-            if (containerBundles.contains(event.getProperty(EventConstants.BUNDLE))) {
+            final Bundle bundle = (Bundle) event.getProperty(EventConstants.BUNDLE);
+            LOG.debug("handleEvent {} for bundle {}", event.getTopic(), bundle);
+            if (containerBundles.contains(bundle)) {
                 containerCreationComplete.countDown();
             }
         });
                 containerCreationComplete.countDown();
             }
         });