summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java2
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java4
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java3
4 files changed, 10 insertions, 8 deletions
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<VnfmOperation> 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);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 78cb533c9e..e6dd38ee1e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -372,7 +372,7 @@ public class WorkflowAction {
}
}
- if (flowsToExecute.isEmpty()) {
+ if (flowsToExecute == null || flowsToExecute.isEmpty()) {
throw new IllegalStateException("Macro did not come up with a valid execution path.");
}
List<String> flowNames = new ArrayList<>();
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java b/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java
index 2478557afc..c4dcc89d0b 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java
@@ -59,7 +59,9 @@ public class CloudifyClientTokenProvider implements CloudifyTokenProvider {
tokenRequest.setBasicAuthentication(user, password);
Token newToken = tokenRequest.execute();
- token = newToken.getValue();
+ if (newToken != null) {
+ token = newToken.getValue();
+ }
if (expiration == null) {
expiration = new Date();
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index 30801119b6..a18f870970 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -856,8 +856,7 @@ public class CatalogDbClient {
protected CvnfcCustomization findCvnfcCustomizationInAList(String cvnfcCustomizationUuid,
List<CvnfcCustomization> cvnfcCustomList) {
if (cvnfcCustomizationUuid == null) {
- throw new EntityNotFoundException(
- "a NULL UUID was provided in query to search for CvnfcCustomization" + cvnfcCustomizationUuid);
+ throw new EntityNotFoundException("a NULL UUID was provided in query to search for CvnfcCustomization");
}
List<CvnfcCustomization> filtered = cvnfcCustomList.stream().filter(c -> c.getModelCustomizationUUID() != null)
.filter(cvnfc -> cvnfcCustomizationUuid.equals(cvnfc.getModelCustomizationUUID()))