diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-07-02 09:59:15 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-07-02 10:03:06 +0300 |
commit | 824c03a9bdd44a76143062b6bb36393f16bffb50 (patch) | |
tree | dd9e5bf357bdfdf6027e5276fc84a301dd0264a0 | |
parent | cabd51660c3c8ec52e329027179f5c6cabb03aca (diff) |
Added null check for heatStack to prevent crash at
getCanonicalName() call
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: Icf49b7db336002ad56769b221ec61101fac04fd5
-rw-r--r-- | adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index d2c0d9cabd..5dff4705af 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -962,7 +962,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { if (netInfo != null) { // Found. Populate the output elements networkExists.value = Boolean.TRUE; - if ("HEAT".equals(mode)) { + if ("HEAT".equals(mode) && heatStack != null) { networkId.value = heatStack.getCanonicalName(); } else { networkId.value = netInfo.getId(); |