From 2896693fdee3d3b5e482786747a08ab5cf40e4d8 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 7 Sep 2018 00:33:21 +0530 Subject: fixed sonar issue in in VfcAdapterRest.java fixed sonar issue as detailed in SO-991 Issue-ID: SO-991 Change-Id: I016f1db14c5dd03f9b9bb872c16a221168c2d628 Signed-off-by: Sandeep J --- .../java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'adapters/mso-vfc-adapter') diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java index b560690e30..0f0a14c8f5 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java @@ -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(); } } -- cgit 1.2.3-korg