mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
Merge branch 'v5-dev' of gitee.com:dromara/hutool into v5-dev
This commit is contained in:
commit
57c191fe1c
@ -85,12 +85,12 @@ public class CollUtil {
|
||||
* 空集合使用{@link Collections#emptyList()}
|
||||
*
|
||||
* @param <T> 集合元素类型
|
||||
* @param set 提供的集合,可能为null
|
||||
* @param list 提供的集合,可能为null
|
||||
* @return 原集合,若为null返回空集合
|
||||
* @since 4.6.3
|
||||
*/
|
||||
public static <T> List<T> emptyIfNull(List<T> set) {
|
||||
return (null == set) ? Collections.emptyList() : set;
|
||||
public static <T> List<T> emptyIfNull(List<T> list) {
|
||||
return (null == list) ? Collections.emptyList() : list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user