diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-07-15 10:20:42 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-07-15 10:20:42 +0300 |
commit | ab88cef747b6aac5b7b652b0af064771953d7af3 (patch) | |
tree | 757ab8308dffa519dd6f0d95bd30ab527bd2951b /adapters/mso-adapter-utils/src/main/java/org | |
parent | 0bfb2cdd5f552c1ae3753b8722ff9ad235e4f2af (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/mso-adapter-utils/src/main/java/org')
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java | 9 |
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 { |