Used constants in the place of dup literals
Sonar fix
Issue-ID: APPC-1557
Change-Id: I4b52b9febabd0fae8aa098004aeba0ef9a085710
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
index 1a21c75..717c399 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
@@ -266,6 +266,7 @@
@Override
public void fetchResults(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException {
int code = STATUS_OK;
+ final String LOG_STR = "fetchResults";
try {
chefInfo(params, ctx);
String nodeListS = params.get(NODE_LIST_STR);
@@ -328,12 +329,12 @@
}
} catch (JSONException e) {
code = APPC_ERRORCODE;
- logger.error(POSTING_REQUEST_JSON_ERROR_STR + "fetchResults", e);
- doFailure(ctx, code, POSTING_REQUEST_JSON_ERROR_STR + "fetchResults" + e.getMessage());
+ logger.error(POSTING_REQUEST_JSON_ERROR_STR + LOG_STR, e);
+ doFailure(ctx, code, POSTING_REQUEST_JSON_ERROR_STR + LOG_STR + e.getMessage());
} catch (Exception e) {
code = APPC_ERRORCODE;
- logger.error(POSTING_REQUEST_ERROR_STR + "fetchResults", e);
- doFailure(ctx, code, POSTING_REQUEST_ERROR_STR + "fetchResults" + e.getMessage());
+ logger.error(POSTING_REQUEST_ERROR_STR + LOG_STR, e);
+ doFailure(ctx, code, POSTING_REQUEST_ERROR_STR + LOG_STR + e.getMessage());
}
}