Fix logging arguments 18/81418/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 5 Apr 2019 18:54:50 +0000 (20:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 6 Apr 2019 16:04:02 +0000 (18:04 +0200)
These are pointed out by upgraded spotbugs, fix them up.

Change-Id: I520c8be21d69c73c0ca9b51d15e63df158fd242a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 07fba4b036ae0df44f814f53b7d13a9fc79c0a75)

netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallhomeStatusReporter.java
netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/MasterSalFacade.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/NetconfTopologyContext.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/NetconfTopologyManager.java
netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/impl/NetconfTopologyImpl.java

index 728c291b786de1932c83b7bb26fc042f90bcb6ea..1f819ae0a34ffa3f0cf5a32597ed9c72d1be6c86 100644 (file)
@@ -266,15 +266,15 @@ class CallhomeStatusReporter implements DataTreeChangeListener<Node>, StatusReco
         commit(tx, device.key());
     }
 
-    private static void commit(WriteTransaction tx, DeviceKey device) {
+    private static void commit(final WriteTransaction tx, final DeviceKey device) {
         tx.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(CommitInfo result) {
+            public void onSuccess(final CommitInfo result) {
                 LOG.debug("Device {} committed", device);
             }
 
             @Override
-            public void onFailure(Throwable cause) {
+            public void onFailure(final Throwable cause) {
                 LOG.warn("Failed to commit device {}", device, cause);
             }
         }, MoreExecutors.directExecutor());
@@ -287,7 +287,7 @@ class CallhomeStatusReporter implements DataTreeChangeListener<Node>, StatusReco
         try {
             return devicesFuture.get().orElse(null);
         } catch (ExecutionException | InterruptedException e) {
-            LOG.error("Error trying to read the whitelist devices: {}", e);
+            LOG.error("Error trying to read the whitelist devices", e);
             return null;
         }
     }
index 3b3c815a8250be63b6529613336b94bd98249d47..d2dbec65d27e856154f65c7fb36bd83583d1eb40 100644 (file)
@@ -170,7 +170,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
                 readAndUpdateStatus(confDevice);
             }
         } catch (ExecutionException | InterruptedException e) {
-            LOG.error("Error trying to read the whitelist devices: {}", e);
+            LOG.error("Error trying to read the whitelist devices", e);
         }
     }
 
@@ -188,12 +188,12 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
 
         opTx.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(CommitInfo result) {
+            public void onSuccess(final CommitInfo result) {
                 LOG.debug("Device deletions committed");
             }
 
             @Override
-            public void onFailure(Throwable cause) {
+            public void onFailure(final Throwable cause) {
                 LOG.warn("Failed to commit device deletions", cause);
             }
         }, MoreExecutors.directExecutor());
@@ -204,7 +204,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
         return devicesFuture.get().map(AllowedDevices::getDevice).orElse(Collections.emptyList());
     }
 
-    private void readAndUpdateStatus(Device cfgDevice) throws InterruptedException, ExecutionException {
+    private void readAndUpdateStatus(final Device cfgDevice) throws InterruptedException, ExecutionException {
         InstanceIdentifier<Device> deviceIID = InstanceIdentifier.create(NetconfCallhomeServer.class)
                 .child(AllowedDevices.class).child(Device.class, new DeviceKey(cfgDevice.getUniqueId()));
 
@@ -224,12 +224,12 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
             .setUniqueId(cfgDevice.getUniqueId()).build());
         tx.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(CommitInfo result) {
+            public void onSuccess(final CommitInfo result) {
                 LOG.debug("Device {} status update committed", cfgDevice.key());
             }
 
             @Override
-            public void onFailure(Throwable cause) {
+            public void onFailure(final Throwable cause) {
                 LOG.warn("Failed to commit device {} status update", cfgDevice.key(), cause);
             }
         }, MoreExecutors.directExecutor());
index 01b276f7387760e21d6ea1a9c1a414839632d4c6..1b7068a442fa4aa2a780966a93c0f1656ed833a4 100644 (file)
@@ -73,7 +73,7 @@ class MasterSalFacade implements AutoCloseable, RemoteDeviceHandler<NetconfSessi
         // We do not support actions in clustered topology yet
         if (domActionService != null) {
             LOG.warn("{}: YANG 1.1 actions are not supported in clustered netconf topology, "
-                    + "DOMActionService will not be exposed for the device");
+                    + "DOMActionService will not be exposed for the device", id);
         }
 
         onDeviceConnected(remoteSchemaContext, sessionPreferences, domRpcService);
index 7adad353407a7b8aca088f2adbded454e3a93b69..09e0fefc685871052a4c3e436258fec286a3293a 100644 (file)
@@ -156,7 +156,7 @@ class NetconfTopologyContext implements ClusterSingletonService, AutoCloseable {
                 @Override
                 public void onComplete(final Throwable failure, final Object success) {
                     if (failure != null) {
-                        LOG.error("Failed to refresh master actor data: {}", failure);
+                        LOG.error("Failed to refresh master actor data", failure);
                         return;
                     }
                     remoteDeviceConnector.startRemoteDeviceConnection(newMasterSalFacade());
index f63d4114b69d6426afbb02a229b4931b6c0bb0ad..49160193b4fb5c17c947946e17daa178abcfbc23 100644 (file)
@@ -252,7 +252,7 @@ public class NetconfTopologyManager
 
             @Override
             public void onFailure(@Nonnull final Throwable throwable) {
-                LOG.error("Unable to initialize netconf-topology, {}", throwable);
+                LOG.error("Unable to initialize netconf-topology", throwable);
             }
         }, MoreExecutors.directExecutor());
 
index 5d88e18f11af8e00bb4953ccb4d944444c2d0864..94ff04ec40d84ca0cca0482e0fbf05c422b735d2 100644 (file)
@@ -106,7 +106,7 @@ public class NetconfTopologyImpl extends AbstractNetconfTopology
 
             @Override
             public void onFailure(final Throwable throwable) {
-                LOG.error("Unable to initialize netconf-topology, {}", throwable);
+                LOG.error("Unable to initialize netconf-topology", throwable);
             }
         }, MoreExecutors.directExecutor());