aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main')
-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;
}