From 43b49025fd8f2cdcbbcaf436fb1c5dfabbaa4855 Mon Sep 17 00:00:00 2001 From: xuegao Date: Tue, 23 Feb 2021 16:16:42 +0100 Subject: Adding unit tests Adding unit tests to improve test coverage. Issue-ID: SDC-3428 Change-Id: I64ed1937fb95b16f8af2df20aa10a6d7c45e42e8 Signed-off-by: xuegao --- .../be/model/tosca/converters/ToscaValueBaseConverter.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'catalog-model/src/main') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueBaseConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueBaseConverter.java index fd987e8c9c..366acd3e77 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueBaseConverter.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueBaseConverter.java @@ -151,14 +151,12 @@ public class ToscaValueBaseConverter { * @param convertedValue * @return */ - static public boolean isEmptyObjectValue(Object convertedValue) { - if (convertedValue == null) { - return true; - } else if (convertedValue instanceof String && ((String) convertedValue).isEmpty()) { - return true; - } else if (convertedValue instanceof Map && ((Map) convertedValue).isEmpty()) { - return true; - } else if (convertedValue instanceof List && ((List) convertedValue).isEmpty()) { + public static boolean isEmptyObjectValue(Object convertedValue) { + if ((convertedValue == null) + || (convertedValue instanceof String && ((String) convertedValue).isEmpty()) + || (convertedValue instanceof Map && ((Map) convertedValue).isEmpty()) + || (convertedValue instanceof List && ((List) convertedValue).isEmpty())) + { return true; } return false; -- cgit 1.2.3-korg