summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java/org
diff options
context:
space:
mode:
authorxuegao <xue.gao@intl.att.com>2021-02-23 16:16:42 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-02-26 17:03:37 +0000
commit43b49025fd8f2cdcbbcaf436fb1c5dfabbaa4855 (patch)
tree34becd0c9d52ff8436e77be37f595059e9e20ebc /catalog-model/src/main/java/org
parent5d760031d3aeecff297c6141adfe5d7490cdcbb9 (diff)
Adding unit tests
Adding unit tests to improve test coverage. Issue-ID: SDC-3428 Change-Id: I64ed1937fb95b16f8af2df20aa10a6d7c45e42e8 Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'catalog-model/src/main/java/org')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueBaseConverter.java14
1 files changed, 6 insertions, 8 deletions
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;