From b85d065c68fe2893e03a391768b91a630dce5988 Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Wed, 17 Feb 2021 14:11:06 +0100 Subject: Fixed null pointer exception for JSON RA Fixed null pointer exception for JSON RA Issue-ID: CCSDK-3170 Signed-off-by: Lukasz Rajewski Change-Id: I721ff7966a1c1bd99ab948cdc410f05688ddea23 --- .../functions/resource/resolution/utils/ResourceAssignmentUtils.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ms') diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt index 3440e3860..5a03450ed 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt @@ -685,7 +685,9 @@ class ResourceAssignmentUtils { raRuntimeService: ResourceAssignmentRuntimeService ): Boolean { val dataTypeProps = raRuntimeService.bluePrintContext().dataTypeByName(dataTypeName)?.properties - val result = outputKeyMapping.filterKeys { !dataTypeProps!!.containsKey(it) }.keys.firstOrNull() + var result: String? = null + if (dataTypeProps != null) + result = outputKeyMapping.filterKeys { !dataTypeProps.containsKey(it) }.keys.firstOrNull() return result == null } -- cgit 1.2.3-korg