From a8bbb7af43cf646ed3ea2fb2f8a0a24edf264182 Mon Sep 17 00:00:00 2001 From: rama-huawei Date: Mon, 25 Sep 2017 18:42:03 +0530 Subject: Rename "status" which hides the class field Issue-Id:SO-118 Change-Id: I7a367373f15f7cfa2d2cfb965b63397cabdcbf1f Signed-off-by: rama-huawei --- .../mso/apihandler/common/CamundaTaskClient.java | 4 ++-- .../mso/apihandler/common/ResponseHandler.java | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'mso-api-handlers') diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java index cf8e94a733..b4e7b7e068 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java @@ -51,7 +51,7 @@ public class CamundaTaskClient extends RequestClient{ StringEntity input = new StringEntity(jsonReq); input.setContentType(CommonConstants.CONTENT_TYPE_JSON); - String encryptedCredentials = null; + String encryptedCredentials; if(props!=null){ encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null); if(encryptedCredentials != null){ @@ -92,7 +92,7 @@ public class CamundaTaskClient extends RequestClient{ throws ClientProtocolException, IOException{ HttpGet get = new HttpGet(url); msoLogger.debug("Camunda Task url is: "+ url); - String encryptedCredentials = null; + String encryptedCredentials; if(props!=null){ encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null); if(encryptedCredentials != null){ diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java index e90989deb8..6722a930ae 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java @@ -131,36 +131,36 @@ public class ResponseHandler { } private int setStatus(int statusCode){ - int status = 0; + int httpStatus; switch(statusCode) { case HttpStatus.SC_ACCEPTED: case HttpStatus.SC_OK: - status = HttpStatus.SC_ACCEPTED; + httpStatus = HttpStatus.SC_ACCEPTED; break; case HttpStatus.SC_BAD_REQUEST: - status = HttpStatus.SC_BAD_REQUEST; + httpStatus = HttpStatus.SC_BAD_REQUEST; break; case HttpStatus.SC_UNAUTHORIZED: case HttpStatus.SC_FORBIDDEN: - status = HttpStatus.SC_INTERNAL_SERVER_ERROR; + httpStatus = HttpStatus.SC_INTERNAL_SERVER_ERROR; break; case HttpStatus.SC_NOT_FOUND: - status = HttpStatus.SC_NOT_IMPLEMENTED; + httpStatus = HttpStatus.SC_NOT_IMPLEMENTED; break; case HttpStatus.SC_INTERNAL_SERVER_ERROR: - status = HttpStatus.SC_BAD_GATEWAY; + httpStatus = HttpStatus.SC_BAD_GATEWAY; break; case HttpStatus.SC_SERVICE_UNAVAILABLE: - status = HttpStatus.SC_SERVICE_UNAVAILABLE; + httpStatus = HttpStatus.SC_SERVICE_UNAVAILABLE; break; case HttpStatus.SC_NO_CONTENT: - status = HttpStatus.SC_NO_CONTENT; + httpStatus = HttpStatus.SC_NO_CONTENT; break; default: - status = HttpStatus.SC_INTERNAL_SERVER_ERROR; + httpStatus = HttpStatus.SC_INTERNAL_SERVER_ERROR; break; } - return status; + return httpStatus; } -- cgit 1.2.3-korg