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 --- .../infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bpmn/so-bpmn-tasks') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java index c4804c05c2..e13d1e4dda 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java @@ -2,6 +2,8 @@ * ============LICENSE_START======================================================= * Copyright (C) 2019 Ericsson. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -85,8 +87,7 @@ public class MonitorVnfmDeleteJobTask extends MonitorVnfmJobTask { + (deleteVnfResponse != null ? deleteVnfResponse.getJobId() : "null") + "Unable to retrieve OperationStatus"; LOGGER.error(message); exceptionUtil.buildAndThrowWorkflowException(execution, 1214, message); - } - if (operationStatusOption.isPresent()) { + } else if (operationStatusOption != null && operationStatusOption.isPresent()) { final OperationStateEnum operationStatus = operationStatusOption.get(); if (operationStatus != OperationStateEnum.COMPLETED) { final String message = -- cgit 1.2.3-korg