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 043501c76875a84a0e9a2ebc97dedb0b92468fea..e3127eddb5a00796a746b49bd341819bd0365c76 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 0ce05ebd1e315b05ed91c521b2a7569809fa12eb..223132c95b066ca8307266168b872ca61280a9ca 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;