From 8216fb7fbf1dc5fd8d334532add11cc91e19be14 Mon Sep 17 00:00:00 2001 From: Lukasz Muszkieta Date: Fri, 2 Aug 2019 17:36:37 +0200 Subject: Fix Blocker Bug Change-Id: I6be7c799896d32ffd20591ce9b8a0957d506b5c3 Issue-ID: SO-2187 Signed-off-by: Lukasz Muszkieta --- .../onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter') diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java index d01e5b186c..68fdb79444 100644 --- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java +++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java @@ -126,15 +126,16 @@ public class JobManager { private OperationStateEnum getOperationState(final VnfmOperation vnfmOperation, final InlineResponse200 operationResponse) { switch (vnfmOperation.getNotificationStatus()) { - case NOTIFICATION_PROCESSING_NOT_REQUIRED: - default: - return OperationStateEnum.fromValue(operationResponse.getOperationState().getValue()); case NOTIFICATION_PROCESSING_PENDING: return org.onap.vnfmadapter.v1.model.OperationStateEnum.PROCESSING; case NOTIFICATION_PROCEESING_SUCCESSFUL: return org.onap.vnfmadapter.v1.model.OperationStateEnum.COMPLETED; case NOTIFICATION_PROCESSING_FAILED: return org.onap.vnfmadapter.v1.model.OperationStateEnum.FAILED; + default: + if (operationResponse == null || operationResponse.getOperationState() == null) + return null; + return OperationStateEnum.fromValue(operationResponse.getOperationState().getValue()); } } @@ -157,7 +158,7 @@ public class JobManager { final java.util.Optional relatedOperation = mapOfJobIdToVnfmOperation.values().stream() .filter(operation -> operation.getOperationId().equals(operationId)).findFirst(); if (relatedOperation.isPresent()) { - relatedOperation.get().setVnfDeleted();; + relatedOperation.get().setVnfDeleted(); } else { logger.debug("No operation found for operation ID {} ", operationId); } -- cgit 1.2.3-korg