summaryrefslogtreecommitdiffstats
path: root/common-app-api/src
diff options
context:
space:
mode:
Diffstat (limited to 'common-app-api/src')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java5
1 files changed, 4 insertions, 1 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 367b806104..9022e7246e 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
@@ -54,5 +54,8 @@ public class JsonUtils {
public static boolean isEmptyJson(JsonElement json) {
return json.isJsonPrimitive() ? false : JsonUtils.isEmptyJson(json.getAsJsonObject());
}
-
+
+ public static boolean isJsonNullOrEmpty(JsonObject json) {
+ return json.isJsonNull() || isEmptyJson(json);
+ }
}