diff options
author | Jegadeesh Babu <jegabab1@in.ibm.com> | 2019-03-26 13:31:39 +0530 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-03-27 21:19:51 +0000 |
commit | e612868cb3405886d104a9940c95da0fdfac218c (patch) | |
tree | c78581d92c785759f8fea19bbaeb80bc42702f07 /appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle | |
parent | 4c8bd08a8b33ccf08c811434f65ce538a3946fb5 (diff) |
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>
Diffstat (limited to 'appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle')
-rw-r--r-- | appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
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 1a21c750c..717c39914 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 @@ public class ChefAdapterImpl implements ChefAdapter { @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 @@ public class ChefAdapterImpl implements ChefAdapter { } } 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()); } } |