Fix Sonar Issues 65/11665/1
authorsurya-huawei <a.u.surya@huawei.com>
Mon, 11 Sep 2017 12:21:24 +0000 (17:51 +0530)
committersurya-huawei <a.u.surya@huawei.com>
Mon, 11 Sep 2017 12:24:19 +0000 (17:54 +0530)
Few major issues in Restapi call node

Issue-Id: CCSDK-87
Change-Id: Ieb733fcf178cecb9983b5135be8d7737cb42a1f3
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java
restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlJsonUtil.java
restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java

index b139da2..775137f 100644 (file)
@@ -44,7 +44,7 @@ public class RetryPolicyStore {
     }
 
     public RetryPolicyStore() {
-        retryPolicies = new HashMap<String, RetryPolicy>();
+        retryPolicies = new HashMap<>();
     }
     
     public RetryPolicy getRetryPolicy(String policyName) {
index 16b9f51..e80ca50 100644 (file)
@@ -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;
     }
 }
index 85c9dc0..61b0e31 100644 (file)
@@ -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;
         }