From: Lukasz Rajewski Date: Wed, 17 Feb 2021 13:11:06 +0000 (+0100) Subject: Fixed null pointer exception for JSON RA X-Git-Tag: 1.1.0~6 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F117949%2F1;p=ccsdk%2Fcds.git 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 --- 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 }