From 7dc5cd2e3bf944056f442a87775b537cc50a0bf3 Mon Sep 17 00:00:00 2001 From: KrupaNagabhushan Date: Mon, 15 Aug 2022 17:06:15 +0100 Subject: Fix error handling for instances with no properties Issue-ID: SDC-4132 Signed-off-by: KrupaNagabhushan Change-Id: Ic31aed1021d3a8a867d398bad8a37668c553acbd --- .../sdc/be/components/impl/ComponentInstanceBusinessLogic.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'catalog-be/src/main') 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 577c49106c..5b15138ad4 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 @@ -3112,9 +3112,10 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic { containerComponentId); } - List instanceProperties = containerComponent.getComponentInstancesProperties().get(componentInstanceUniqueId); - if (CollectionUtils.isEmpty(instanceProperties)) { - instanceProperties = new ArrayList<>(); + List instanceProperties = new ArrayList<>(); + if (MapUtils.isNotEmpty(containerComponent.getComponentInstancesProperties())) { + instanceProperties = containerComponent.getComponentInstancesProperties() + .get(componentInstanceUniqueId); } return instanceProperties; } catch (ComponentException e) { -- cgit 1.2.3-korg