From 198dcad3901704a0b68a545e4cc7dbc4b5343413 Mon Sep 17 00:00:00 2001 From: "r.bogacki" Date: Mon, 8 Apr 2019 11:07:57 +0200 Subject: Fixed recent Sonar blocker issues Fixed blockers according to Sonar analysis. Change-Id: Ib068b586cd72c1634780220ac5498e1962dee434 Issue-ID: SO-1734 Signed-off-by: Robert Bogacki --- .../src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'adapters/mso-adapter-utils/src/main/java') diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java index 6d4deeb0f1..eb003cdda6 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java @@ -233,7 +233,8 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin{ StackInfo stackStatus = getStackStatus(cloudSiteId, cloudOwner, tenantId, canonicalName, pollForCompletion, timeoutMinutes, backout); if (HeatStatus.CREATED.equals(stackStatus.getStatus())) { - multicloudAaiUpdate(cloudSiteId, cloudOwner, tenantId, genericVnfId, vfModuleId, multicloudResponseBody.getWorkloadId(), pollForCompletion, timeoutMinutes); + String workloadId = multicloudResponseBody == null ? null : multicloudResponseBody.getWorkloadId(); + multicloudAaiUpdate(cloudSiteId, cloudOwner, tenantId, genericVnfId, vfModuleId, workloadId, pollForCompletion, timeoutMinutes); } return stackStatus; @@ -398,6 +399,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin{ if (multicloudClient == null) { if (logger.isDebugEnabled()) logger.debug("Multicloud client could not be initialized"); + return; } Response response = multicloudClient.post(multicloudRequest); -- cgit 1.2.3-korg