aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/main/java
diff options
context:
space:
mode:
authorNITIN KAWA <nitin.kawa@huawei.com>2019-04-24 08:43:56 +0000
committernitin kawa <nitin.kawa@huawei.com>2019-04-24 10:04:00 +0000
commita48569b0cafc5072157f8899611b8d061cc83fae (patch)
tree40b965640f0fc9c63a6880417d0fb97118506724 /mso-api-handlers/mso-api-handler-common/src/main/java
parentb15889d217c97f80a973e5b594dd198ce011c78c (diff)
Removal of unused local variables.
Removal of unused local guidelines as per guidelines. Issue-ID: SO-1490 Change-Id: I54df34d24a88b5cf7a4e3f0a222ff334b85ebe83 Signed-off-by: NITIN KAWA <nitin.kawa@huawei.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
index d11f1706e9..e6e81671cf 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
@@ -49,6 +49,9 @@ import com.fasterxml.jackson.databind.SerializationFeature;
public class CamundaClient extends RequestClient {
private static Logger logger = LoggerFactory.getLogger(CamundaClient.class);
private static final String CAMUNDA_URL_MESAGE = "Camunda url is: ";
+ private static final String CAMUNDA_RESPONSE = "Response is: {}";
+ private static final String AUTHORIZATION = "Authorization";
+ private static final String BASIC = "Basic ";
public CamundaClient() {
super(CommonConstants.CAMUNDA);
@@ -71,7 +74,7 @@ public class CamundaClient extends RequestClient {
setupHeaders(post);
HttpResponse response = client.execute(post);
- logger.debug("Response is: {}", response);
+ logger.debug(CAMUNDA_RESPONSE, response);
return response;
}
@@ -88,8 +91,8 @@ public class CamundaClient extends RequestClient {
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
if (userCredentials != null) {
- post.addHeader("Authorization",
- "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ post.addHeader(AUTHORIZATION,
+ BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
}
}
}
@@ -111,8 +114,8 @@ public class CamundaClient extends RequestClient {
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
if (userCredentials != null) {
- post.addHeader("Authorization",
- "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ post.addHeader(AUTHORIZATION,
+ BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
}
}
}
@@ -120,7 +123,7 @@ public class CamundaClient extends RequestClient {
post.setEntity(input);
HttpResponse response = client.execute(post);
- logger.debug("Response is: {}", response);
+ logger.debug(CAMUNDA_RESPONSE, response);
return response;
}
@@ -151,15 +154,15 @@ public class CamundaClient extends RequestClient {
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
if (userCredentials != null) {
- post.addHeader("Authorization",
- "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ post.addHeader(AUTHORIZATION,
+ BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
}
}
}
post.setEntity(input);
HttpResponse response = client.execute(post);
- logger.debug("Response is: {}", response);
+ logger.debug(CAMUNDA_RESPONSE, response);
return response;
}