summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src
diff options
context:
space:
mode:
authorRamanjaneya-Huawei <ramanjaneya.palleti@huawei.com>2017-10-19 15:37:48 +0530
committerRamanjaneya-Huawei <ramanjaneya.palleti@huawei.com>2017-10-19 15:38:47 +0530
commitd46417a25cd32c38ac8a6a0be331f354214eac01 (patch)
tree6202b3b2f50870c876ffd8303d1f08f74e0ba55b /adapters/mso-adapter-utils/src
parentf2cc7284ebee1ac9159a95a8666467b4d85328f8 (diff)
Fixed multiple so issues
Change-Id: I4b73cdeeb2a636d42df7b1b156e27e958c828048 Issue-id: SO-224 Signed-off-by: Ramanjaneya-Huawei <ramanjaneya.palleti@huawei.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java9
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);