From: Robert Varga Date: Fri, 5 Apr 2019 18:54:50 +0000 (+0200) Subject: Fix logging arguments X-Git-Tag: release/neon-sr1~8 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=netconf.git;a=commitdiff_plain;h=f0b0a99508a36b2087b507ad1ab976255599f4af Fix logging arguments These are pointed out by upgraded spotbugs, fix them up. Change-Id: I520c8be21d69c73c0ca9b51d15e63df158fd242a Signed-off-by: Robert Varga (cherry picked from commit 07fba4b036ae0df44f814f53b7d13a9fc79c0a75) --- diff --git a/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallhomeStatusReporter.java b/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallhomeStatusReporter.java index 728c291b78..1f819ae0a3 100644 --- a/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallhomeStatusReporter.java +++ b/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallhomeStatusReporter.java @@ -266,15 +266,15 @@ class CallhomeStatusReporter implements DataTreeChangeListener, 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() { @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, 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; } } diff --git a/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java b/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java index 3b3c815a82..d2dbec65d2 100644 --- a/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java +++ b/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java @@ -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() { @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 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() { @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()); diff --git a/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/MasterSalFacade.java b/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/MasterSalFacade.java index 01b276f738..1b7068a442 100644 --- a/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/MasterSalFacade.java +++ b/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/MasterSalFacade.java @@ -73,7 +73,7 @@ class MasterSalFacade implements AutoCloseable, RemoteDeviceHandler