From f79ef8c3f922e6d467d74c2ac3e8bec9cb2b991a Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Tue, 23 Apr 2019 16:06:54 +0530 Subject: Rework remote command arguments Change-Id: Ibd24ce87ed67aee6ae1a66fc9ec6af35bee5008a Issue-ID: CCSDK-1215 Signed-off-by: Brinda Santh --- .../org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ms/controllerblueprints') diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt index 72c2c1df3..0e45232f2 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt @@ -101,6 +101,12 @@ fun ArrayNode.asListOfString(): List { return JacksonUtils.getListFromJsonNode(this, String::class.java) } +fun JsonNode.returnNullIfMissing(): JsonNode? { + return if (this is NullNode || this is MissingNode) { + null + } else this +} + /** * Convert Json to map of json node, the root fields will be map keys */ -- cgit 1.2.3-korg