diff options
author | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2019-08-19 15:54:21 -0400 |
---|---|---|
committer | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2019-08-19 15:54:21 -0400 |
commit | 82949f958eb17f0f06a8779598e84af8f0cca558 (patch) | |
tree | d1055c90e4b763e0411aa1df8b2492c532f4ce29 /ms/controllerblueprints/modules | |
parent | 45f09e768722282391c2ea82894ac148ca9a8918 (diff) |
JacksonUtils.kt primitives bugfix
Issue-Id: CCSDK-1614
Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
Change-Id: I1991c1605889ea152fca2d93f5d31b073dd7985d
Diffstat (limited to 'ms/controllerblueprints/modules')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt | 7 |
1 files changed, 3 insertions, 4 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 7c2466fb7..9e71bfef9 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,8 +243,8 @@ class JacksonUtils { BluePrintConstants.DATA_TYPE_FLOAT, BluePrintConstants.DATA_TYPE_DOUBLE, BluePrintConstants.DATA_TYPE_TIMESTAMP, - BluePrintConstants.DATA_TYPE_STRING-> - objectNode.set(key, value.asJsonPrimitive()) + BluePrintConstants.DATA_TYPE_STRING -> + objectNode.set(key, value as JsonNode) else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)") } } @@ -256,7 +256,7 @@ class JacksonUtils { BluePrintConstants.DATA_TYPE_FLOAT, BluePrintConstants.DATA_TYPE_DOUBLE, BluePrintConstants.DATA_TYPE_TIMESTAMP, - BluePrintConstants.DATA_TYPE_STRING -> arrayNode.add(value.asJsonPrimitive()) + BluePrintConstants.DATA_TYPE_STRING -> arrayNode.add(value as JsonNode) else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)") } } @@ -300,7 +300,6 @@ class JacksonUtils { BluePrintConstants.DATA_TYPE_INTEGER -> jsonNodeFromObject(value.toInt()) BluePrintConstants.DATA_TYPE_FLOAT -> jsonNodeFromObject(value.toFloat()) BluePrintConstants.DATA_TYPE_DOUBLE -> jsonNodeFromObject(value.toDouble()) - //TODO: Verify.. I assume string type should be here.. BluePrintConstants.DATA_TYPE_STRING -> jsonNodeFromObject(value) else -> getJsonNode(value) } |