aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-04-30 19:48:09 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-30 19:48:09 +0000
commit6b6ac70007ba2b52c6beb8c0d22453a628c891f3 (patch)
treebb7652ee250367b28e7542036059d17423d9a506 /ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap
parent7c7c3b5c0bbc83f927282e0ea9287c50365f64b5 (diff)
parent3fb8905c569e11c5c1a92ea583124e911862b596 (diff)
Merge "Fix null safety - ResourceResolutionDBService.write"
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