Rename "status" which hides the class field 75/15075/2
authorrama-huawei <rama.subba.reddy.s@huawei.com>
Mon, 25 Sep 2017 13:12:03 +0000 (18:42 +0530)
committerRama SubbaReddy <rama.subba.reddy.s@huawei.com>
Mon, 25 Sep 2017 13:13:17 +0000 (13:13 +0000)
Issue-Id:SO-118

Change-Id: I7a367373f15f7cfa2d2cfb965b63397cabdcbf1f
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java

index cf8e94a..b4e7b7e 100644 (file)
@@ -51,7 +51,7 @@ public class CamundaTaskClient extends RequestClient{
                StringEntity input = new StringEntity(jsonReq);\r
                input.setContentType(CommonConstants.CONTENT_TYPE_JSON);\r
 \r
-               String encryptedCredentials = null;\r
+               String encryptedCredentials;\r
                if(props!=null){\r
                        encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null);\r
                        if(encryptedCredentials != null){\r
@@ -92,7 +92,7 @@ public class CamundaTaskClient extends RequestClient{
                        throws ClientProtocolException, IOException{\r
                HttpGet get = new HttpGet(url);\r
                msoLogger.debug("Camunda Task url is: "+ url);  \r
-               String encryptedCredentials = null;\r
+               String encryptedCredentials;\r
                if(props!=null){\r
                        encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null);\r
                        if(encryptedCredentials != null){\r
index e90989d..6722a93 100644 (file)
@@ -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;
        }