From 6029c038ec36da60a72bea70556abcf64963260e Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Thu, 14 Sep 2017 15:25:10 +0530 Subject: Fix Sonar issues few major issues in sli/northbound module Issue-Id: CCSDK-87 Change-Id: I2c1a8b41266aae6941c5f2fdbb8b08ea91dde6ec Signed-off-by: surya-huawei --- .../onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java index 1b6049278..32e51599e 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java @@ -51,7 +51,7 @@ public class SdncBaseModel { public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Metadata metadata) { - params = new HashMap(); + params = new HashMap<>(); this.sdcCsarHelper = sdcCsarHelper; // extract service metadata @@ -66,7 +66,7 @@ public class SdncBaseModel { public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { - params = new HashMap(); + params = new HashMap<>(); this.sdcCsarHelper = sdcCsarHelper; // extract nodeTemplate metadata @@ -79,7 +79,7 @@ public class SdncBaseModel { public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Group group) { - params = new HashMap(); + params = new HashMap<>(); this.sdcCsarHelper = sdcCsarHelper; // extract group metadata @@ -257,9 +257,9 @@ public class SdncBaseModel { sb.append(") values (" + getCustomizationUUID() + ", \"" + model_yaml + "\", "); paramCount = 0; - for (String paramKey : params.keySet()) { + for (Map.Entry entry : params.entrySet()) { paramCount++; - String paramValue = params.get(paramKey); + String paramValue = entry.getValue(); sb.append(paramValue); if (paramCount < params.size()) sb.append(", "); } @@ -283,9 +283,9 @@ public class SdncBaseModel { sb.append(") values (" + keyValue + ", "); paramCount = 0; - for (String paramKey : params.keySet()) { + for (Map.Entry entry : params.entrySet()) { paramCount++; - String paramValue = params.get(paramKey); + String paramValue = entry.getValue(); sb.append(paramValue); if (paramCount < params.size()) sb.append(", "); } -- cgit 1.2.3-korg