diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-09-30 14:05:49 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-09-30 14:05:49 +0300 |
commit | bcba1e15d0e55eb90d0910dbbe3d30e9d88ed2bf (patch) | |
tree | d3da9071a972cf72e8ca4f4e8fab57f9ddb9ecc4 /adapters/mso-adapter-utils/src/main/java/org | |
parent | d6a26f001eb691c6e8b7269e9045980ca3a57e9b (diff) |
Added null check for execute() result to remove
static analyzer warning
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: Ifc8481b659c5b53378611f9e80db087db590ae05
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org')
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java | 6 |
1 files changed, 5 insertions, 1 deletions
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 |