Fix Sonar issues
few major issues in sli/northbound module
Issue-Id: CCSDK-87
Change-Id: I2c1a8b41266aae6941c5f2fdbb8b08ea91dde6ec
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
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 1b60492..32e5159 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 SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Metadata metadata) {
- params = new HashMap<String, String>();
+ params = new HashMap<>();
this.sdcCsarHelper = sdcCsarHelper;
// extract service metadata
@@ -66,7 +66,7 @@
public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) {
- params = new HashMap<String, String>();
+ params = new HashMap<>();
this.sdcCsarHelper = sdcCsarHelper;
// extract nodeTemplate metadata
@@ -79,7 +79,7 @@
public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Group group) {
- params = new HashMap<String, String>();
+ params = new HashMap<>();
this.sdcCsarHelper = sdcCsarHelper;
// extract group metadata
@@ -257,9 +257,9 @@
sb.append(") values (" + getCustomizationUUID() + ", \"" + model_yaml + "\", ");
paramCount = 0;
- for (String paramKey : params.keySet()) {
+ for (Map.Entry<String,String> 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 @@
sb.append(") values (" + keyValue + ", ");
paramCount = 0;
- for (String paramKey : params.keySet()) {
+ for (Map.Entry<String,String> entry : params.entrySet()) {
paramCount++;
- String paramValue = params.get(paramKey);
+ String paramValue = entry.getValue();
sb.append(paramValue);
if (paramCount < params.size()) sb.append(", ");
}