From e5488e5e3623646125802b8ab7e12b7159a2c0d3 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Mon, 7 Mar 2022 18:48:09 +0000 Subject: Support complex types in artifact properties Adds support to complex types in artifact properties of an interface operation implementation. Change-Id: I7a82a3652541b35230fe4ce87bf703a1dbe72d50 Issue-ID: SDC-3899 Signed-off-by: andre.schmid --- .../src/main/java/org/openecomp/sdc/common/util/JsonUtils.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common-app-api/src') diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java index be534d2909..c76310ecf4 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java @@ -24,6 +24,10 @@ import com.google.gson.JsonObject; public class JsonUtils { + private JsonUtils() { + + } + public static String toString(JsonElement jsonElement) { if (jsonElement == null) { return null; @@ -48,6 +52,9 @@ public class JsonUtils { } public static boolean isEmptyJson(final JsonElement json) { + if (json == null || json.isJsonNull()) { + return true; + } if (json.isJsonArray()) { return json.getAsJsonArray().isEmpty(); } -- cgit 1.2.3-korg