aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-05-28 13:36:06 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-28 13:36:06 +0000
commiteaf433d585816f477dca4f31281b0a67d95ba658 (patch)
treee5d0693dce90e4673ffbbaafcc206a6af786a04a /mso-api-handlers
parent4e7600ba8dd36eb03f8f5b71bd61985eeee99389 (diff)
parent52a1a5a22a9bd4e183c8c0607e2b75f6503a43c9 (diff)
Merge "Return empty WorkflowInputParameters" into dublin
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecifications.json3
2 files changed, 4 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
index e8171ac834..bba8064f7c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
@@ -175,7 +175,7 @@ public class WorkflowSpecificationsHandler {
private List<WorkflowInputParameter> buildWorkflowInputParameters(Workflow workflow) {
List<WorkflowActivitySpecSequence> workflowActivitySpecSequences = workflow.getWorkflowActivitySpecSequence();
if (workflowActivitySpecSequences == null || workflowActivitySpecSequences.size() == 0) {
- return null;
+ return new ArrayList<WorkflowInputParameter>();
}
Map<String, WorkflowInputParameter> workflowInputParameterMap = new HashMap<String, WorkflowInputParameter>();
for (WorkflowActivitySpecSequence workflowActivitySpecSequence : workflowActivitySpecSequences) {
@@ -199,7 +199,7 @@ public class WorkflowSpecificationsHandler {
}
if (workflowInputParameterMap.size() == 0) {
- return null;
+ return new ArrayList<WorkflowInputParameter>();
}
List<WorkflowInputParameter> workflowInputParameterList =
workflowInputParameterMap.values().stream().collect(Collectors.toList());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecifications.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecifications.json
index 545fbbe26c..59bc12d92d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecifications.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecifications.json
@@ -122,7 +122,8 @@
"operationName": "inPlaceSoftwareUpdate",
"workflowSource": "native",
"workflowResourceTarget": "vnf"
- }
+ },
+ "workflowInputParameters": []
}
}
]