Commit 9d6ae6e7 authored by yanzg's avatar yanzg

修复bug

parent 5d50db83
...@@ -20,15 +20,16 @@ public class ArrayHelper { ...@@ -20,15 +20,16 @@ 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) {
for (Collection<T> list : froms) { return tos;
for (T item : list) { }
if (!StringHelper.isEmpty(item)) { for (Collection<T> list : froms) {
tos.add(item); for (T item : list) {
} if (!StringHelper.isEmpty(item)) {
tos.add(item);
} }
} }
} }
......
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