summaryrefslogtreecommitdiffstats
path: root/common-app-api/src
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-10-24 18:45:00 +0300
committerTal Gitelman <tg851x@intl.att.com>2017-10-24 18:45:00 +0300
commit3a7c314a597a7ceda028696b9542be15e747b2af (patch)
treef19c33d0dd48954560dfa59217f17cd41719b0bb /common-app-api/src
parenteeec4b98a8a9ddcde80ce0260038d5b9191fc832 (diff)
align MME
- [BUG323816] Don't add a property to a newly generated csar if the value is not set and the default value is not provided Change-Id: I76b312ef8140ca6207aa7604026c1b0a89bfbe02 Issue-ID:SDC-500 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
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);
+ }
}