summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-19 00:38:29 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-19 00:38:29 +0000
commit00dd4a698edf0c7591bc83d7389369487f74779f (patch)
treeb5e46850d2abefe1027ba772448d648a0214a765
parent0dad402fd01d72c76235d8a8c1d9b256e9de5042 (diff)
parent8c31f39f7e587214273cb496acd0b5243a724551 (diff)
Merge "Sonar fix: AsdcApiSliClient.java"
-rw-r--r--asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java
index 02dc786ac..880a2fb76 100644
--- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java
+++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +35,8 @@ public class AsdcApiSliClient {
private final SvcLogicService svcLogicService;
+ private String ErrorCode = "error-code";
+
public AsdcApiSliClient(final SvcLogicService svcLogicService) {
this.svcLogicService = svcLogicService;
}
@@ -78,12 +81,12 @@ public class AsdcApiSliClient {
if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) {
- if (!respProps.containsKey("error-code")) {
- respProps.setProperty("error-code", "500");
+ if (!respProps.containsKey(ErrorCode)) {
+ respProps.setProperty(ErrorCode, "500");
}
} else {
- if (!respProps.containsKey("error-code")) {
- respProps.setProperty("error-code", "200");
+ if (!respProps.containsKey(ErrorCode)) {
+ respProps.setProperty(ErrorCode, "200");
}
}