From d46417a25cd32c38ac8a6a0be331f354214eac01 Mon Sep 17 00:00:00 2001 From: Ramanjaneya-Huawei Date: Thu, 19 Oct 2017 15:37:48 +0530 Subject: Fixed multiple so issues Change-Id: I4b73cdeeb2a636d42df7b1b156e27e958c828048 Issue-id: SO-224 Signed-off-by: Ramanjaneya-Huawei --- .../org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'adapters/mso-adapter-utils/src/main/java/org') diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java index bd649e867f..c227d72f0c 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java @@ -32,7 +32,6 @@ import java.util.Set; import java.util.Map.Entry; import org.openecomp.mso.db.catalog.beans.HeatTemplateParam; import org.codehaus.jackson.map.ObjectMapper; -import java.util.LinkedHashMap; import org.yaml.snakeyaml.Yaml; @@ -63,7 +62,7 @@ public class MsoYamlEditorWithEnvt { public synchronized Set getParameterListFromEnvt() { // In an environment entry, the parameters section can only contain the name:value - // not other attributes. - Set paramSet = new HashSet(); + Set paramSet = new HashSet<>(); Map resourceMap = null; try { resourceMap = (Map) yml.get("parameters"); @@ -79,13 +78,9 @@ public class MsoYamlEditorWithEnvt { while (it.hasNext()) { MsoHeatEnvironmentParameter hep = new MsoHeatEnvironmentParameter(); Map.Entry pair = it.next(); - //Map resourceEntry = (Map ) pair.getValue(); - //String value = null; - String value = null; + String value; Object obj = pair.getValue(); if (obj instanceof java.lang.String) { - //value = (String) pair.getValue(); - // handle block scalar - literals and folded: value = yaml.dump(obj); // but this adds an extra '\n' at the end - which won't hurt - but we don't need it value = value.substring(0, value.length() - 1); -- cgit 1.2.3-korg