mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
!228 cn.hutool.core.collection.CollUtil#addAll(java.util.Collection<T>, java.lang.Iterable<T>) 判断空指针
Merge pull request !228 from jiangzeyin/v5-dev
This commit is contained in:
commit
0596112cf6
@ -2108,6 +2108,9 @@ public class CollUtil {
|
|||||||
* @return 原集合
|
* @return 原集合
|
||||||
*/
|
*/
|
||||||
public static <T> Collection<T> addAll(Collection<T> collection, Iterable<T> iterable) {
|
public static <T> Collection<T> addAll(Collection<T> collection, Iterable<T> iterable) {
|
||||||
|
if (iterable == null) {
|
||||||
|
return collection;
|
||||||
|
}
|
||||||
return addAll(collection, iterable.iterator());
|
return addAll(collection, iterable.iterator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user