Fix (and suppress) some static code analysis warnings in blueprint
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / SpecificReferenceListMetadata.java
index c9aab3b..9a0bd29 100644 (file)
@@ -141,7 +141,7 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet
 
     private Object serviceAdded(ServiceReference<Object> reference) {
         Object service = container().getBundleContext().getService(reference);
-        Object serviceType = reference.getProperty(OpendaylightNamespaceHandler.TYPE_ATTR);
+        String serviceType = (String) reference.getProperty(OpendaylightNamespaceHandler.TYPE_ATTR);
 
         LOG.debug("{}: Service type {} added from bundle {}", logName(), serviceType,
                 reference.getBundle().getSymbolicName());
@@ -166,7 +166,7 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet
         if (isSatisfied()) {
             restartContainer();
         } else {
-            retrievedServiceTypes.add(serviceType.toString());
+            retrievedServiceTypes.add(serviceType);
             retrievedServices.add(service);
 
             if (retrievedServiceTypes.equals(expectedServiceTypes)) {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.