aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-dao/src/main')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/utils/CollectionUtils.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/utils/CollectionUtils.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/utils/CollectionUtils.java
index 7336859fd7..15bef3b23b 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/utils/CollectionUtils.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/utils/CollectionUtils.java
@@ -20,13 +20,23 @@
package org.openecomp.sdc.be.dao.utils;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Set;
public final class CollectionUtils {
private CollectionUtils() {
}
+ public static <T> List<T> safeGetList(List<T> listToCheck) {
+ return org.apache.commons.collections.CollectionUtils.isNotEmpty(listToCheck) ? listToCheck : Collections.emptyList();
+ }
+
/**
* Add the content of the 'source' Set to the 'target' set and return the
* union set.