aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2020-04-30 13:27:56 -0400
committerDan Timoney <dtimoney@att.com>2020-04-30 19:48:17 +0000
commit465d3a5478ebb88a536bf5becf4646e4608fc2f3 (patch)
treec5ae95a2d952e63f4680533b8bf38ae57a628109 /ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap
parent3858bde949a3008de512a026264d8787138348b1 (diff)
Fix null safety - ResourceResolutionDBService.write
Issue-ID: CCSDK-2352 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I49a56dff0636617111f02be141764600e0a1e082 (cherry picked from commit 3fb8905c569e11c5c1a92ea583124e911862b596)
Diffstat (limited to 'ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap')
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
index dc1553747..1a5d062a3 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
@@ -181,11 +181,11 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
resourceResolution.resolutionKey = resolutionKey
resourceResolution.resourceType = resourceType
resourceResolution.resourceId = resourceId
- if (BluePrintConstants.STATUS_SUCCESS == resourceAssignment.status) {
- resourceResolution.value = JacksonUtils.getValue(resourceAssignment.property?.value!!).toString()
- } else {
- resourceResolution.value = ""
- }
+ resourceResolution.value = resourceAssignment.property?.value?.let {
+ if (BluePrintConstants.STATUS_SUCCESS == resourceAssignment.status)
+ JacksonUtils.getValue(it).toString()
+ else ""
+ } ?: ""
resourceResolution.name = resourceAssignment.name
resourceResolution.dictionaryName = resourceAssignment.dictionaryName
resourceResolution.dictionaryVersion = resourceAssignment.version