diff options
author | Steve Smokowski <ss835w@att.com> | 2019-07-18 20:41:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-18 20:41:44 +0000 |
commit | f765cc2ab30384f05af70c4011102389c9462e70 (patch) | |
tree | 20786778ff64382708e125a98aaaf788a17ae2d1 /adapters/mso-adapter-utils | |
parent | 0ebd61225c80044f1601e0d2c4bea1820f0dee08 (diff) | |
parent | ab88cef747b6aac5b7b652b0af064771953d7af3 (diff) |
Merge "Added null check for yaml to prevent crash at getParameterListFromEnvt()"
Diffstat (limited to 'adapters/mso-adapter-utils')
-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 { |