aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurya-huawei <a.u.surya@huawei.com>2017-09-11 17:51:24 +0530
committersurya-huawei <a.u.surya@huawei.com>2017-09-11 17:54:19 +0530
commit322886522453c65818199d3575e34d554d3b28ee (patch)
tree66c1299e2b1ba89861e5401e6c569bcd316f494a
parent6f48bb92c2a6464a2807bde665aa1d1486f769f9 (diff)
Fix Sonar Issues
Few major issues in Restapi call node Issue-Id: CCSDK-87 Change-Id: Ieb733fcf178cecb9983b5135be8d7737cb42a1f3 Signed-off-by: surya-huawei <a.u.surya@huawei.com>
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java2
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java2
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java6
3 files changed, 5 insertions, 5 deletions
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java
index b139da27..775137ff 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java
@@ -44,7 +44,7 @@ public class RetryPolicyStore {
}
public RetryPolicyStore() {
- retryPolicies = new HashMap<String, RetryPolicy>();
+ retryPolicies = new HashMap<>();
}
public RetryPolicy getRetryPolicy(String policyName) {
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java
index 16b9f519..e80ca508 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java
@@ -366,7 +366,7 @@ public class XmlJsonUtil {
private static String pad(int n) {
String s = "";
for (int i = 0; i < n; i++)
- s += '\t';
+ s += Character.toString('\t');
return s;
}
}
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java
index 85c9dc01..61b0e31d 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java
@@ -69,7 +69,7 @@ public class XmlParser {
super();
this.listNameList = listNameList;
if (this.listNameList == null)
- this.listNameList = new HashSet<String>();
+ this.listNameList = new HashSet<>();
}
String currentName = "";
@@ -88,7 +88,7 @@ public class XmlParser {
name = name.substring(i2 + 1);
if (currentName.length() > 0)
- currentName += '.';
+ currentName += Character.toString('.');
currentName += name;
String listName = removeIndexes(currentName);
@@ -152,7 +152,7 @@ public class XmlParser {
else if (c == ']')
add = true;
else if (add)
- s += c;
+ s += Character.toString(c);
}
return s;
}