General Sonar clean-up
[netvirt.git] / utils / mdsal-openflow / src / main / java / org / opendaylight / ovsdb / utils / mdsal / openflow / InstructionUtils.java
index 80ad548dc5da22cfdd35c922e8685637a2566e48..39cef222f42e0929e7418ccc6c83f2e83c677c28 100644 (file)
@@ -79,7 +79,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 public class InstructionUtils {
-    private static final Logger logger = LoggerFactory.getLogger(InstructionUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(InstructionUtils.class);
     private static final int IPV4 = 0x8100;
     private static final int MAX_LENGTH = 0xffff;
 
@@ -158,7 +158,7 @@ public class InstructionUtils {
     public static InstructionBuilder createOutputPortInstructions(InstructionBuilder ib, Long dpidLong, Long port) {
 
         NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
-        logger.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} inPort={} ",
+        LOG.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} inPort={} ",
                 dpidLong, port);
 
         List<Action> actionList = Lists.newArrayList();
@@ -193,7 +193,7 @@ public class InstructionUtils {
             Long dpidLong, Long port,
             List<Instruction> instructions) {
         NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
-        logger.debug(
+        LOG.debug(
                 "addOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}",
                 dpidLong, port, instructions);
 
@@ -239,7 +239,7 @@ public class InstructionUtils {
 
         final NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
         final Uri ncidUri = new Uri(ncid);
-        logger.debug(
+        LOG.debug(
                 "removeOutputPortFromInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}",
                 dpidLong, port, instructions);
 
@@ -300,7 +300,7 @@ public class InstructionUtils {
                 } else if (action.getOrder() == removedActionOrder) {
                     // Sanity: implementation assumes no two actions have the same order
                     //
-                    logger.error("Found action with same order as the action removed for {}, order {} index {}: {}",
+                    LOG.error("Found action with same order as the action removed for {}, order {} index {}: {}",
                             ncid, removedActionOrder, i, action);
                 }
 
@@ -316,8 +316,8 @@ public class InstructionUtils {
             // If port we are asked to delete is not found, this implementation will leave actions
             // alone and not remove the flow, as long as a remaining OutputActionCase is found.
             //
-            for (int i = 0; i < actionList.size(); i++) {
-                if (actionList.get(i).getAction() instanceof OutputActionCase) {
+            for (Action action : actionList) {
+                if (action.getAction() instanceof OutputActionCase) {
                     removeFlow = false;
                     break;
                 }
@@ -329,7 +329,7 @@ public class InstructionUtils {
             ApplyActionsBuilder aab = new ApplyActionsBuilder();
             aab.setAction(actionList);
             ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
-            logger.debug("removeOutputPortFromInstructions() : applyAction {}", aab.build());
+            LOG.debug("removeOutputPortFromInstructions() : applyAction {}", aab.build());
             return false;
         } else {
             /* if all output ports are removed. Return true to indicate flow remove */