From 824c03a9bdd44a76143062b6bb36393f16bffb50 Mon Sep 17 00:00:00 2001 From: Oleksandr Moliavko Date: Tue, 2 Jul 2019 09:59:15 +0300 Subject: Added null check for heatStack to prevent crash at getCanonicalName() call Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko Change-Id: Icf49b7db336002ad56769b221ec61101fac04fd5 --- .../main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'adapters/mso-openstack-adapters/src') 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(); -- cgit 1.2.3-korg