summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-08-26 16:56:59 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-09-07 13:14:33 +0000
commit00f293346ed73585faea502c6fc6bac1481f7422 (patch)
treec521279952c8e9d76fe56d65ed8b09adb89c9fb8 /catalog-be/src/main
parent745e350c8595f7e44846a3de1d2c946485a63ad0 (diff)
Fix NPE for no inputs on instance operation
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4145 Change-Id: I6813382db7101de0c18d03a058c2c36a48b5a828
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java
index 0a7ce20015..bf0f1b2812 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java
@@ -1997,6 +1997,10 @@ public class ServiceImportBusinessLogic {
private void mergeOperationInputDefinitions(ListDataDefinition<OperationInputDefinition> inputsFromNodeType,
ListDataDefinition<OperationInputDefinition> instanceInputs) {
+ if (inputsFromNodeType == null || CollectionUtils.isEmpty(inputsFromNodeType.getListToscaDataDefinition()) || instanceInputs == null
+ || CollectionUtils.isEmpty(instanceInputs.getListToscaDataDefinition())) {
+ return;
+ }
instanceInputs.getListToscaDataDefinition().forEach(
instanceInput -> inputsFromNodeType.getListToscaDataDefinition().stream().filter(
templateInput -> templateInput.getName().equals(instanceInput.getName())