diff options
Diffstat (limited to 'catalog-be/src/main/java/org')
2 files changed, 3 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/DeclaredInputsResolver.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/DeclaredInputsResolver.java index 6f60776d2f..28e1b93ec8 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/DeclaredInputsResolver.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/DeclaredInputsResolver.java @@ -66,6 +66,7 @@ public class DeclaredInputsResolver { private List<InputDefinition> prepareInputsForRedeclaration(Map<String, InputDefinition> oldInputsById, RedeclareInputData redeclareInputData) { List<InputDefinition> inputsForRedeclaration = redeclareInputData.declaredInputIds.stream() + .filter(oldInputsById::containsKey) .map(oldInputsById::get) .map(InputDefinition::new) .collect(Collectors.toList()); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java index 7f9bf1c370..840cf77275 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java @@ -1,5 +1,6 @@ package org.openecomp.sdc.be.components.merge.property; +import java.util.Objects; import org.openecomp.sdc.be.dao.utils.MapUtil; import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; @@ -66,7 +67,7 @@ class PropertyInstanceMergeDataBuilder { private static List<String> getOldDeclaredInputsByUser(List<GetInputValueDataDefinition> getInputValues, Map<String, InputDefinition> oldInputsByName) { return getInputValues.stream().map(GetInputValueDataDefinition::getInputName) .map(oldInputsByName::get) - .filter(oldInput -> oldInput.getInstanceUniqueId() != null) + .filter(oldInput -> Objects.nonNull(oldInput) && oldInput.getInstanceUniqueId() != null) .map(PropertyDataDefinition::getName) .collect(Collectors.toList()); } |