Fix logging arguments 25/81125/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 22 Mar 2019 19:32:08 +0000 (20:32 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 22 Mar 2019 19:55:44 +0000 (20:55 +0100)
Upgraded spotbugs is finding these violations, fix them up.

Change-Id: I6f7490cd1d48c6e22d048842265bf71d0ff24afc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ContextReferenceExtractor.java
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/AbstractMXBean.java

index 043501c..e3127ed 100644 (file)
@@ -66,14 +66,15 @@ abstract class ContextReferenceExtractor {
             if (InstanceIdentifier.class.isAssignableFrom(returnType)) {
                 return DirectGetterRouteContextExtractor.create(contextGetter);
             }
-            final Method getValueMethod = findGetValueMethod(returnType,InstanceIdentifier.class);
+            final Method getValueMethod = findGetValueMethod(returnType, InstanceIdentifier.class);
             if (getValueMethod != null) {
                 return GetValueRouteContextExtractor.create(contextGetter, getValueMethod);
             } else {
-                LOG.warn("Class {} can not be used to determine context, falling back to NULL_EXTRACTOR.",returnType);
+                LOG.warn("Class {} can not be used to determine context, falling back to NULL_EXTRACTOR.", returnType);
             }
         } catch (final IllegalAccessException e) {
-            LOG.warn("Class {} does not conform to Binding Specification v1. Falling back to NULL_EXTRACTOR", e);
+            LOG.warn("Class {} does not conform to Binding Specification v1. Falling back to NULL_EXTRACTOR",
+                returnType, e);
         }
         return NULL_EXTRACTOR;
     }
index 0ce05eb..223132c 100644 (file)
@@ -110,7 +110,7 @@ public abstract class AbstractMXBean {
             LOG.debug("MBean {} registered successfully", mbeanName.getCanonicalName());
         } catch (InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException
                 | MalformedObjectNameException e) {
-            LOG.error("registration failed {}", e);
+            LOG.error("registration failed", e);
         }
         return registered;
     }
@@ -135,7 +135,7 @@ public abstract class AbstractMXBean {
             unregisterMBean(mbeanName);
             unregister = true;
         } catch (MBeanRegistrationException | InstanceNotFoundException | MalformedObjectNameException e) {
-            LOG.debug("Failed when unregistering MBean {}", e);
+            LOG.debug("Failed when unregistering MBean", e);
         }
 
         return unregister;

©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.