Fix more Sonar warnings
[controller.git] / benchmark / ntfbenchmark / src / main / java / ntfbenchmark / impl / NtfbenchBlockingProducer.java
index 021369acb0fe0178ee87853f569f313021217759..ee77a6c342ed841258ce086d3481255590aa06d1 100644 (file)
@@ -8,8 +8,11 @@
 package ntfbenchmark.impl;
 
 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class NtfbenchBlockingProducer extends AbstractNtfbenchProducer {
+    private static final Logger LOG = LoggerFactory.getLogger(NtfbenchBlockingProducer.class);
 
     public NtfbenchBlockingProducer(final NotificationPublishService publishService, final int iterations,
             final int payloadSize) {
@@ -22,12 +25,13 @@ public class NtfbenchBlockingProducer extends AbstractNtfbenchProducer {
         int ntfOk = 0;
         int ntfError = 0;
 
-        for (int i = 0; i < this.iterations; i++) {
+        for (int i = 0; i < iterations; i++) {
             try {
-                this.publishService.putNotification(this.ntf);
+                publishService.putNotification(ntf);
                 ntfOk++;
             } catch (final Exception e) {
                 ntfError++;
+                LOG.debug("Failed to push notification", e);
             }
         }