diff options
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt index 73dff9379..1f1345327 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt @@ -243,7 +243,8 @@ class JacksonUtils { BluePrintConstants.DATA_TYPE_FLOAT, BluePrintConstants.DATA_TYPE_DOUBLE, BluePrintConstants.DATA_TYPE_TIMESTAMP, - BluePrintConstants.DATA_TYPE_STRING -> + BluePrintConstants.DATA_TYPE_STRING, + BluePrintConstants.DATA_TYPE_NULL -> objectNode.set(key, value) else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)") } @@ -256,7 +257,9 @@ class JacksonUtils { BluePrintConstants.DATA_TYPE_FLOAT, BluePrintConstants.DATA_TYPE_DOUBLE, BluePrintConstants.DATA_TYPE_TIMESTAMP, - BluePrintConstants.DATA_TYPE_STRING -> arrayNode.add(value) + BluePrintConstants.DATA_TYPE_STRING, + BluePrintConstants.DATA_TYPE_NULL -> + arrayNode.add(value) else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)") } } @@ -284,7 +287,7 @@ class JacksonUtils { } } - fun populateJsonNodeValues(key: String, nodeValue: JsonNode, type: String, objectNode: ObjectNode) { + fun populateJsonNodeValues(key: String, nodeValue: JsonNode?, type: String, objectNode: ObjectNode) { if (nodeValue == null || nodeValue is NullNode) { objectNode.set(key, nodeValue) } else if (BluePrintTypes.validPrimitiveTypes().contains(type)) { |