Commit 9d6ae6e7 authored by yanzg's avatar yanzg

修复bug

parent 5d50db83
......@@ -20,15 +20,16 @@ public class ArrayHelper {
*/
public static <T extends Object> List<T> megerNotEmpty(T from, Collection<T>... froms) {
List<T> tos = new ArrayList<>();
if (!StringHelper.isEmpty(from)) {
if (from != null && !StringHelper.isEmpty(from)) {
tos.add(from);
}
if (froms != null) {
for (Collection<T> list : froms) {
for (T item : list) {
if (!StringHelper.isEmpty(item)) {
tos.add(item);
}
if (froms == null) {
return tos;
}
for (Collection<T> list : froms) {
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