diff options
author | shrek2000 <orenkle@amdocs.com> | 2019-02-10 13:28:36 +0200 |
---|---|---|
committer | shrek2000 <orenkle@amdocs.com> | 2019-02-10 14:30:22 +0200 |
commit | af8e36eb7f43803bd9cf40e9b46a0c0c8f47c781 (patch) | |
tree | 23536f9e993ebbbbf65df7d5288f2263e892dddb /catalog-be/src | |
parent | 1dd5db924b88f390f3301a0e3f229c0a81a91080 (diff) |
Fix Null Pointer Issue
Add dependent child service to service
Issue-ID: SDC-1987
Change-Id: I99418251ffc45f025fe9cd4505159a20ea115e86
Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'catalog-be/src')
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()); } |