From 322886522453c65818199d3575e34d554d3b28ee Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Mon, 11 Sep 2017 17:51:24 +0530 Subject: Fix Sonar Issues Few major issues in Restapi call node Issue-Id: CCSDK-87 Change-Id: Ieb733fcf178cecb9983b5135be8d7737cb42a1f3 Signed-off-by: surya-huawei --- .../org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java | 2 +- .../java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java | 2 +- .../main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java | 6 +++--- 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 b139da279..775137fff 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(); + 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 16b9f519f..e80ca5081 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 85c9dc018..61b0e31d4 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(); + 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; } -- cgit 1.2.3-korg