fixed sonar issue in in VfcAdapterRest.java 63/65063/2
authorSandeep J <sandeejh@in.ibm.com>
Thu, 6 Sep 2018 19:03:21 +0000 (00:33 +0530)
committerByung-Woo Jun <byung-woo.jun@ericsson.com>
Mon, 10 Sep 2018 02:20:29 +0000 (02:20 +0000)
fixed sonar issue as detailed in SO-991

Issue-ID: SO-991
Change-Id: I016f1db14c5dd03f9b9bb872c16a221168c2d628
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java

index b560690..0f0a14c 100644 (file)
@@ -54,6 +54,7 @@ public class VfcAdapterRest {
 
     private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, VfcAdapterRest.class);
     private static final String REQUEST_DEBUG_MSG="body from request is {}";
+    private static final String APPLICATION_EXCEPTION="ApplicationException: ";
     @Autowired
     private VfcManager driverMgr ;
 
@@ -80,7 +81,7 @@ public class VfcAdapterRest {
             RestfulResponse rsp = driverMgr.createNs(nsInput);
             return buildResponse(rsp);
         } catch(ApplicationException e) {
-            LOGGER.debug("ApplicationException: ", e);
+            LOGGER.debug(APPLICATION_EXCEPTION, e);
             return e.buildErrorResponse();
         }
     }
@@ -106,7 +107,7 @@ public class VfcAdapterRest {
             RestfulResponse rsp = driverMgr.deleteNs(nsOperationKey, nsInstanceId);
             return buildResponse(rsp);
         } catch(ApplicationException e) {
-            LOGGER.debug("ApplicationException: ", e);
+            LOGGER.debug(APPLICATION_EXCEPTION, e);
             return e.buildErrorResponse();
         }
     }
@@ -131,7 +132,7 @@ public class VfcAdapterRest {
             RestfulResponse rsp = driverMgr.getNsProgress(nsOperationKey, jobId);
             return buildResponse(rsp);
         } catch(ApplicationException e) {
-            LOGGER.debug("ApplicationException: ", e);
+            LOGGER.debug(APPLICATION_EXCEPTION, e);
             return e.buildErrorResponse();
         }
     }
@@ -156,7 +157,7 @@ public class VfcAdapterRest {
             RestfulResponse rsp = driverMgr.instantiateNs(nsInstanceId, nsInput);
             return buildResponse(rsp);
         } catch(ApplicationException e) {
-            LOGGER.debug("ApplicationException: ", e);
+            LOGGER.debug(APPLICATION_EXCEPTION, e);
             return e.buildErrorResponse();
         }
     }
@@ -181,7 +182,7 @@ public class VfcAdapterRest {
             RestfulResponse rsp = driverMgr.terminateNs(nsOperationKey, nsInstanceId);
             return buildResponse(rsp);
         } catch(ApplicationException e) {
-            LOGGER.debug("ApplicationException: ", e);
+            LOGGER.debug(APPLICATION_EXCEPTION, e);
             return e.buildErrorResponse();
         }
     }
@@ -207,7 +208,7 @@ public class VfcAdapterRest {
                RestfulResponse rsp = driverMgr.scaleNs(nsInstanceId, nsInput);
                return buildResponse(rsp);
        } catch(ApplicationException e) {
-                   LOGGER.debug("ApplicationException: ", e);
+                   LOGGER.debug(APPLICATION_EXCEPTION, e);
                return e.buildErrorResponse();
        }
     }