From d4fd2ca0fba827042fc5313efeaf9cdf850be647 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Mon, 25 Sep 2023 11:16:55 +0100 Subject: [PATCH] Fix NPE on service import Signed-off-by: MichaelMorris Issue-ID: SDC-4634 Change-Id: Ib5785890d5cfa5b014cf5f4eef9d15855b7ff7e6 --- .../openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java | 3 +++ 1 file changed, 3 insertions(+) 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 7dadbee790..6301929ce3 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 @@ -2189,6 +2189,9 @@ public class ServiceImportBusinessLogic { } private List addImplicitAttributeValues(Resource originResource, UploadComponentInstanceInfo uploadComponentInstanceInfo) { + if (uploadComponentInstanceInfo.getAttributes() == null) { + return Collections.emptyList(); + } List origAttributes = originResource.getAttributes().stream().map(AttributeDefinition::getName).collect(toList()); Map uploadAttributes = uploadComponentInstanceInfo.getAttributes(); List newAttributesToAdd = -- 2.16.6