From 6c5b28a2ca61aa348f13e11e1236aa0154cdb6c8 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Wed, 20 Apr 2022 14:34:49 +0100 Subject: Fix NPE when adding ASD VF to service Signed-off-by: MichaelMorris Issue-ID: SDC-3974 Change-Id: I3f962f7ea46781e26b7267871a61a6f6f434fae2 --- .../sdc/be/components/impl/ComponentInstanceBusinessLogic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java index 60e2501f11..8d12751c07 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java @@ -915,7 +915,7 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } if (CollectionUtils.isNotEmpty(filteredGroups)) { filteredGroups.stream() - .filter(g -> g.getArtifacts().stream().anyMatch(p -> p.equals(artifactDefinition.getGeneratedFromId()))).findFirst() + .filter(g -> g.getArtifacts() != null && g.getArtifacts().stream().anyMatch(p -> p.equals(artifactDefinition.getGeneratedFromId()))).findFirst() .ifPresent(g -> fillInstanceArtifactMap(groupInstancesArtifacts, artifactDefinition, g)); } } -- cgit 1.2.3-korg