From 898808c3bb6646f2374685c1cc33383928a34a30 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Mon, 20 Feb 2023 13:17:45 +0000 Subject: Fix NPE when setting complex type value Signed-off-by: MichaelMorris Issue-ID: SDC-4403 Change-Id: I8194ccce7d0c48588e3dd8b1903be22ba92ac955 --- .../sdc/be/components/impl/ComponentInstanceBusinessLogic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'catalog-be/src/main/java') 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 142969aa4a..96366194d3 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 @@ -1987,7 +1987,7 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } if (CollectionUtils.isNotEmpty(property.getSubPropertyToscaFunctions())) { ToscaPropertyType type = ToscaPropertyType.isValidType(property.getType()); - if (type.equals(ToscaPropertyType.LIST)) { + if (ToscaPropertyType.LIST.equals(type)) { final JSONArray jsonArray = property.getValue() == null ? new JSONArray() : new JSONArray(property.getValue()); property.getSubPropertyToscaFunctions().stream().forEach(subToscaFunction -> { addE(jsonArray, subToscaFunction.getSubPropertyPath(), subToscaFunction.getToscaFunction().getValue()); -- cgit 1.2.3-korg