Sonar bug Fixes 93/14793/3
authorBindya Narayan <bindya.narayan@intel.com>
Tue, 3 Feb 2015 23:59:26 +0000 (15:59 -0800)
committerSam Hague <shague@redhat.com>
Fri, 6 Feb 2015 03:09:15 +0000 (03:09 +0000)
Signed-off-by: Bindya Narayan <bindya.narayan@intel.com>
ovs-sfc/src/main/java/org/opendaylight/ovsdb/ovssfc/SfpHandler.java

index 5d834fe20752784cfe83a9b98a247ac255b39eec..8d1b42315398736471f79be61f3d29e3969b2056 100644 (file)
@@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
 import java.util.List;
 
 public class SfpHandler {
-    private static final Logger logger = LoggerFactory.getLogger(SfpHandler.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(SfpHandler.class);
     private OvsSfcProvider ovsSfcProvider = OvsSfcProvider.getOvsSfcProvider();
     private int vlan;
 
@@ -34,7 +34,7 @@ public class SfpHandler {
     }
 
     void processSfp (SfcEvent.Action action, ServiceFunctionPath serviceFunctionPath) {
-        logger.trace("\nOVSSFC Enter: {}, action: {}\n   sfp: {}",
+        LOGGER.trace("\nOVSSFC Enter: {}, action: {}\n   sfp: {}",
                 Thread.currentThread().getStackTrace()[1],
                 action.toString(),
                 serviceFunctionPath.toString());
@@ -50,11 +50,11 @@ public class SfpHandler {
                 break;
         }
 
-        logger.trace("\nOVSSFC Exit: {}", Thread.currentThread().getStackTrace()[1]);
+        LOGGER.trace("\nOVSSFC Exit: {}", Thread.currentThread().getStackTrace()[1]);
     }
 
     void processSfps (SfcEvent.Action action, ServiceFunctionPaths serviceFunctionPaths) {
-        logger.trace("\nOVSSFC Enter: {}, action: {}\n   sfps: {}",
+        LOGGER.trace("\nOVSSFC Enter: {}, action: {}\n   sfps: {}",
                 Thread.currentThread().getStackTrace()[1],
                 action.toString(),
                 serviceFunctionPaths.toString());
@@ -69,7 +69,7 @@ public class SfpHandler {
             break;
         }
 
-        logger.trace("\nOVSSFC Exit: {}", Thread.currentThread().getStackTrace()[1]);
+        LOGGER.trace("\nOVSSFC Exit: {}", Thread.currentThread().getStackTrace()[1]);
     }
 
     /*
@@ -80,13 +80,14 @@ public class SfpHandler {
      *
      */
     private void sfpUpdate (ServiceFunctionPath serviceFunctionPath) {
-        logger.trace("\nOVSSFC {}\n Building SFP {}",
+        LOGGER.trace("\nOVSSFC {}\n Building SFP {}",
                 Thread.currentThread().getStackTrace()[1],
                 serviceFunctionPath.getName());
 
         // TODO: replace with correct getAccessList when the restonf issue is fixed.
-        AccessListEntries accessListEntries = null;// = ovsSfcProvider.aclUtils.getAccessList(serviceFunctionPath.getName());
-        logger.trace("\n   acl: {}", accessListEntries);
+        //ovsSfcProvider.aclUtils.getAccessList(serviceFunctionPath.getName());
+        AccessListEntries accessListEntries = null;
+        LOGGER.trace("\n   acl: {}", accessListEntries);
         // TODO: code to convert acl into flows
 
         String serviceFunctionForwarderName;
@@ -94,7 +95,7 @@ public class SfpHandler {
         Short startingIndex = serviceFunctionPath.getStartingIndex();
         List<ServicePathHop> servicePathHopList = serviceFunctionPath.getServicePathHop();
         for (ServicePathHop servicePathHop : servicePathHopList) {
-            logger.trace("\n   sph: {}", servicePathHop);
+            LOGGER.trace("\n   sph: {}", servicePathHop);
 
             serviceFunctionForwarderName = servicePathHop.getServiceFunctionForwarder();
             serviceFunctionForwarder = ovsSfcProvider.sffUtils.readServiceFunctionForwarder(serviceFunctionForwarderName);
@@ -104,7 +105,7 @@ public class SfpHandler {
                 if (ovsNode != null) {
                     Long dpid = ovsSfcProvider.ovsUtils.getDpid(ovsNode, serviceFunctionForwarderName);
                     if (dpid.equals(0)) {
-                        logger.warn("cannot find dpid for {}", serviceFunctionForwarderName);
+                        LOGGER.warn("cannot find dpid for {}", serviceFunctionForwarderName);
                         continue;
                     }
                     if (servicePathHop.getServiceIndex().equals(startingIndex)) {