From bcba1e15d0e55eb90d0910dbbe3d30e9d88ed2bf Mon Sep 17 00:00:00 2001 From: Oleksandr Moliavko Date: Mon, 30 Sep 2019 14:05:49 +0300 Subject: Added null check for execute() result to remove static analyzer warning Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko Change-Id: Ifc8481b659c5b53378611f9e80db087db590ae05 --- .../src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'adapters/mso-adapter-utils/src/main') diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java index 2a17656f1d..4eb16d46b2 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java @@ -419,7 +419,11 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin { logger.debug("pollTimeout remaining: " + pollTimeout); execution = queryExecution.execute(); - status = execution.getStatus(); + if (execution != null) { + status = execution.getStatus(); + } else { + status = TERMINATED; + } } // Broke the loop. Check again for a terminal state -- cgit 1.2.3-korg