diff options
author | KrupaNagabhushan <krupa.nagabhushan@est.tech> | 2022-08-15 17:06:15 +0100 |
---|---|---|
committer | Andr� Schmid <andre.schmid@est.tech> | 2022-08-16 08:58:33 +0000 |
commit | 7dc5cd2e3bf944056f442a87775b537cc50a0bf3 (patch) | |
tree | 63fbd92b3bf304ab01cfc8c443ccbc039ec59953 /catalog-be/src/main/java | |
parent | fbfa96e29315ede4e41d43f6009367282ee46115 (diff) |
Fix error handling for instances with no properties
Issue-ID: SDC-4132
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Change-Id: Ic31aed1021d3a8a867d398bad8a37668c553acbd
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java | 7 |
1 files changed, 4 insertions, 3 deletions
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<ComponentInstanceProperty> instanceProperties = containerComponent.getComponentInstancesProperties().get(componentInstanceUniqueId); - if (CollectionUtils.isEmpty(instanceProperties)) { - instanceProperties = new ArrayList<>(); + List<ComponentInstanceProperty> instanceProperties = new ArrayList<>(); + if (MapUtils.isNotEmpty(containerComponent.getComponentInstancesProperties())) { + instanceProperties = containerComponent.getComponentInstancesProperties() + .get(componentInstanceUniqueId); } return instanceProperties; } catch (ComponentException e) { |