summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-12-18 00:20:42 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2018-12-18 00:20:50 +0530
commit56f264776099b0944e790327d3e0ad70acead8a6 (patch)
tree21ff7bd56d8a4175afe1f1bdabdd61db99bd4750
parent4882f248ed6355c234daa25cd1913afb3897e51d (diff)
Sonar fix: LcmSliClient.java
Fixed sonar issues/code-smells across thisfile Issue-ID: CCSDK-849 Change-Id: Id79d62c6117a0ce7d3551f655b0a56f23c8a0fde Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r--lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java
index 9fcc92c88..54e53c776 100644
--- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java
+++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java
@@ -5,6 +5,7 @@ package org.onap.ccsdk.sli.northbound;
* ================================================================================
* 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.
@@ -36,6 +37,8 @@ public class LcmSliClient {
private final SvcLogicService svcLogicService;
+ private String ErrorCode = "error-code";
+
public LcmSliClient(final SvcLogicService svcLogicService) {
this.svcLogicService = svcLogicService;
}
@@ -80,12 +83,12 @@ public class LcmSliClient {
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");
}
}