mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix emptyCount bug
This commit is contained in:
parent
a6d8b3fd59
commit
1ec09bf0fa
@ -9,6 +9,7 @@
|
||||
|
||||
### Bug修复
|
||||
* 【db】 解决ThreadLocalConnection多数据源被移除问题(pr#66@Gitee)
|
||||
* 【core】 解决ArrayUtil.emptyCount计数错误问题(issue#509@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -3770,7 +3770,7 @@ public class ArrayUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否存在一个以上{@code null}或空对象,通过{@link ObjectUtil#isEmpty(Object)} 判断元素
|
||||
* 计算{@code null}或空元素对象的个数,通过{@link ObjectUtil#isEmpty(Object)} 判断元素
|
||||
*
|
||||
* @param args 被检查的对象,一个或者多个
|
||||
* @return 存在{@code null}的数量
|
||||
@ -3781,7 +3781,7 @@ public class ArrayUtil {
|
||||
if (isNotEmpty(args)) {
|
||||
for (Object element : args) {
|
||||
if (ObjectUtil.isEmpty(element)) {
|
||||
return count++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user