OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / applications / bulk-o-matic / src / main / java / org / opendaylight / openflowplugin / applications / bulk / o / matic / FlowReader.java
index 9fa1aa5e4953f50eecd465b5f51429564166a748..4b9ff5761f1a1a9f0cbbb6388bae5b8a5ce33253 100644 (file)
@@ -28,7 +28,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class FlowReader implements Runnable, FlowCounterMBean {
+public final class FlowReader implements Runnable, FlowCounterMBean {
     private static final Logger LOG = LoggerFactory.getLogger(FlowReader.class);
     private final DataBroker dataBroker;
     private final Integer dpnCount;
@@ -63,14 +63,14 @@ public class FlowReader implements Runnable, FlowCounterMBean {
 
     @Override
     public void run() {
-        readFlowsX(dpnCount, flowsPerDpn, verbose);
+        readFlowsX();
     }
 
-    private void readFlowsX(Integer dpnCount, Integer flowsPerDPN, boolean verbose) {
+    private void readFlowsX() {
         readOpStatus.set(FlowCounter.OperationStatus.IN_PROGRESS.status());
         for (int i = 1; i <= dpnCount; i++) {
             String dpId = BulkOMaticUtils.DEVICE_TYPE_PREFIX + i;
-            for (int j = 0; j < flowsPerDPN; j++) {
+            for (int j = 0; j < flowsPerDpn; j++) {
                 short tableRollover = (short) (endTableId - startTableId + 1);
                 short tableId = (short) (j % tableRollover + startTableId);
 
@@ -101,7 +101,7 @@ public class FlowReader implements Runnable, FlowCounterMBean {
                     }
                 } catch (ReadFailedException e) {
                     readOpStatus.set(FlowCounter.OperationStatus.FAILURE.status());
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Error {}", e);
                 }
             }
         }