summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-02-20 13:17:45 +0000
committerMichael Morris <michael.morris@est.tech>2023-02-20 16:13:17 +0000
commit898808c3bb6646f2374685c1cc33383928a34a30 (patch)
tree66778409010ae0e33f726fa3c6edb13608168479 /catalog-be/src/main
parentc947189eb1a342ee14e1aebc43d45b41bf0d3dd6 (diff)
Fix NPE when setting complex type value
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4403 Change-Id: I8194ccce7d0c48588e3dd8b1903be22ba92ac955
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java2
1 files changed, 1 insertions, 1 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 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());