aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-09-25 11:16:55 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-09-25 13:54:13 +0000
commitd4fd2ca0fba827042fc5313efeaf9cdf850be647 (patch)
tree36138bd00620f8d4c59a345e1ab0e77b3cdc676b
parentf4668df71072c8ecd4b9d05423006265b36a6ef7 (diff)
Fix NPE on service import
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4634 Change-Id: Ib5785890d5cfa5b014cf5f4eef9d15855b7ff7e6
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java3
1 files changed, 3 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 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<AttributeDefinition> addImplicitAttributeValues(Resource originResource, UploadComponentInstanceInfo uploadComponentInstanceInfo) {
+ if (uploadComponentInstanceInfo.getAttributes() == null) {
+ return Collections.emptyList();
+ }
List<String> origAttributes = originResource.getAttributes().stream().map(AttributeDefinition::getName).collect(toList());
Map<String, UploadAttributeInfo> uploadAttributes = uploadComponentInstanceInfo.getAttributes();
List<String> newAttributesToAdd =