Commit 9d6ae6e7 authored by yanzg's avatar yanzg

修复bug

parent 5d50db83
...@@ -20,10 +20,12 @@ public class ArrayHelper { ...@@ -20,10 +20,12 @@ public class ArrayHelper {
*/ */
public static <T extends Object> List<T> megerNotEmpty(T from, Collection<T>... froms) { public static <T extends Object> List<T> megerNotEmpty(T from, Collection<T>... froms) {
List<T> tos = new ArrayList<>(); List<T> tos = new ArrayList<>();
if (!StringHelper.isEmpty(from)) { if (from != null && !StringHelper.isEmpty(from)) {
tos.add(from); tos.add(from);
} }
if (froms != null) { if (froms == null) {
return tos;
}
for (Collection<T> list : froms) { for (Collection<T> list : froms) {
for (T item : list) { for (T item : list) {
if (!StringHelper.isEmpty(item)) { if (!StringHelper.isEmpty(item)) {
...@@ -31,7 +33,6 @@ public class ArrayHelper { ...@@ -31,7 +33,6 @@ public class ArrayHelper {
} }
} }
} }
}
return tos; return tos;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment