From 5bb4ff9c40aa14cd417fc553994bcca9ef03f203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=BF=98=E5=88=9D=E5=BF=83?= Date: Wed, 9 Dec 2020 18:26:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?cn.hutool.core.collection.CollUtil#addAll(j?= =?UTF-8?q?ava.util.Collection,=20java.lang.Iterable)=20=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/hutool/core/collection/CollUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java b/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java index aa73d40f5..870594aa1 100644 --- a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java @@ -2108,6 +2108,9 @@ public class CollUtil { * @return 原集合 */ public static Collection addAll(Collection collection, Iterable iterable) { + if(iterable == null){ + return collection; + } return addAll(collection, iterable.iterator()); } From 0ee10efa041d9e0e5bf83acf85ae0a1ed914c50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=BF=98=E5=88=9D=E5=BF=83?= Date: Wed, 9 Dec 2020 18:27:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?cn.hutool.core.collection.CollUtil#addAll(j?= =?UTF-8?q?ava.util.Collection,=20java.lang.Iterable)=20=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/hutool/core/collection/CollUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java b/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java index 870594aa1..7f629bc0f 100644 --- a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java @@ -2108,7 +2108,7 @@ public class CollUtil { * @return 原集合 */ public static Collection addAll(Collection collection, Iterable iterable) { - if(iterable == null){ + if (iterable == null) { return collection; } return addAll(collection, iterable.iterator());