diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-10-23 05:17:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-23 05:17:51 +0000 |
commit | cb81b55dd9505499ff3facbaeec1a6a8bacb6b3c (patch) | |
tree | 073b7143284a0527c96ac68e1fa0063354febbe7 | |
parent | b4630a2fed1b382c37ff497b4f5917584f2b84fa (diff) | |
parent | d46417a25cd32c38ac8a6a0be331f354214eac01 (diff) |
Merge "Fixed multiple so issues"
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java | 9 |
1 files changed, 2 insertions, 7 deletions
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 <MsoHeatEnvironmentParameter> getParameterListFromEnvt() { // In an environment entry, the parameters section can only contain the name:value - // not other attributes. - Set <MsoHeatEnvironmentParameter> paramSet = new HashSet<MsoHeatEnvironmentParameter>(); + Set <MsoHeatEnvironmentParameter> paramSet = new HashSet<>(); Map<String, Object> resourceMap = null; try { resourceMap = (Map<String,Object>) yml.get("parameters"); @@ -79,13 +78,9 @@ public class MsoYamlEditorWithEnvt { while (it.hasNext()) { MsoHeatEnvironmentParameter hep = new MsoHeatEnvironmentParameter(); Map.Entry <String, Object> pair = it.next(); - //Map<String, String> resourceEntry = (Map <String, String>) 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); |