summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorOleksandr Moliavko <o.moliavko@samsung.com>2019-07-15 10:20:42 +0300
committerOleksandr Moliavko <o.moliavko@samsung.com>2019-07-15 10:20:42 +0300
commitab88cef747b6aac5b7b652b0af064771953d7af3 (patch)
tree757ab8308dffa519dd6f0d95bd30ab527bd2951b /adapters
parent0bfb2cdd5f552c1ae3753b8722ff9ad235e4f2af (diff)
Added null check for yaml to prevent crash at
getParameterListFromEnvt() Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com> Change-Id: I8fabba8d99e311f01a5fd5dad166e0bb643044e3
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java
index 723bed17f7..8cacf8526a 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java
@@ -58,9 +58,12 @@ public class MsoHeatEnvironmentEntry {
return;
byte[] b = this.rawEntry.toString().getBytes();
MsoYamlEditorWithEnvt yaml = new MsoYamlEditorWithEnvt(b);
- this.parameters = yaml.getParameterListFromEnvt();
- // this.resources = yaml.getResourceListFromEnvt();
- StringBuilder sb = this.getResourceRegistryRawEntry();
+ StringBuilder sb = null;
+ if (yaml != null) {
+ this.parameters = yaml.getParameterListFromEnvt();
+ // this.resources = yaml.getResourceListFromEnvt();
+ sb = this.getResourceRegistryRawEntry();
+ }
if (sb == null) {
this.resourceRegistryEntryRaw = new StringBuilder("");
} else {