From 729eb6708fd48294c32da856c46515ff14a831d0 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Tue, 24 Oct 2017 18:45:00 +0300 Subject: 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 --- .../src/main/java/org/openecomp/sdc/common/util/JsonUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common-app-api') 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); + } } -- cgit 1.2.3-korg