Fixed Sonar blocker issues
[so.git] / bpmn / so-bpmn-tasks / src / main / java / org / onap / so / bpmn / infrastructure / adapter / vnfm / tasks / MonitorVnfmCreateJobTask.java
index 59ff71a..9e0c26b 100644 (file)
@@ -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 MonitorVnfmCreateJobTask extends MonitorVnfmJobTask{
           + "Unable to retrieve OperationStatus";
       LOGGER.error(message);
       exceptionUtil.buildAndThrowWorkflowException(execution, 1206, message);
-    }
-    if (operationStatusOption.isPresent()) {
+    } else if (operationStatusOption != null && operationStatusOption.isPresent()) {
       final OperationStateEnum operationStatus = operationStatusOption.get();
       if (operationStatus != OperationStateEnum.COMPLETED) {
         final String message = "Unable to instantiate jobId: "