Fix NPE when setting complex type value 42/133342/2
authorMichaelMorris <michael.morris@est.tech>
Mon, 20 Feb 2023 13:17:45 +0000 (13:17 +0000)
committerMichael Morris <michael.morris@est.tech>
Mon, 20 Feb 2023 16:13:17 +0000 (16:13 +0000)
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-4403
Change-Id: I8194ccce7d0c48588e3dd8b1903be22ba92ac955

catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java

index 142969a..9636619 100644 (file)
@@ -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());