summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-09-25 16:51:26 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-25 16:51:26 +0000
commitef9055315a126a25383183cbf00e64d784a94296 (patch)
treea5b13721ffd7e3cfa6792ba2d7a0babdcfbbf049 /mso-api-handlers
parent8fa513b3cf11c5ed60d8d3be4ade123deb1379ff (diff)
parenta8bbb7af43cf646ed3ea2fb2f8a0a24edf264182 (diff)
Merge "Rename "status" which hides the class field"
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java20
2 files changed, 12 insertions, 12 deletions
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;
}