aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-api
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-03-07 18:48:09 +0000
committerMichael Morris <michael.morris@est.tech>2022-03-11 16:48:13 +0000
commite5488e5e3623646125802b8ab7e12b7159a2c0d3 (patch)
tree58c896b9d2f434041cff1cafad7835dd9cd691f3 /common-app-api
parentf13f58eb867c763e6ed1c3b674fd99b1081a0664 (diff)
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 <andre.schmid@est.tech>
Diffstat (limited to 'common-app-api')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java7
1 files changed, 7 insertions, 0 deletions
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();
}