aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksandr Moliavko <o.moliavko@samsung.com>2019-08-19 10:54:42 +0300
committerOleksandr Moliavko <o.moliavko@samsung.com>2019-08-19 10:54:42 +0300
commit5b17afb416e3ab2d3f58694d275e67f20af5a1c6 (patch)
tree7cec67661f42946dc835355a2305157de35af9bb
parent89973876dbbf8ad910420d60f8dcbb0c89bf6c62 (diff)
Added null check for heat to remove static
analyzer warning Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com> Change-Id: I71eb14adcc1227af4470853e6e1acdb631a7efe8
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index 1d73bf21c9..af2fa24ff9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -640,7 +640,11 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
StackInfo heatStack = null;
try {
- heatStack = heat.queryStack(cloudSiteId, cloudOwner, tenantId, vfModuleName);
+ if (heat != null) {
+ heatStack = heat.queryStack(cloudSiteId, cloudOwner, tenantId, vfModuleName);
+ } else {
+ throw new MsoHeatNotFoundException();
+ }
} catch (MsoException me) {
String error = "Create VF Module: Query " + vfModuleName + " in " + cloudOwner + "/" + cloudSiteId + "/"
+ tenantId + ": " + me;