mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix emptyCount bug
This commit is contained in:
parent
a6d8b3fd59
commit
1ec09bf0fa
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
### Bug修复
|
### Bug修复
|
||||||
* 【db】 解决ThreadLocalConnection多数据源被移除问题(pr#66@Gitee)
|
* 【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 被检查的对象,一个或者多个
|
* @param args 被检查的对象,一个或者多个
|
||||||
* @return 存在{@code null}的数量
|
* @return 存在{@code null}的数量
|
||||||
@ -3781,7 +3781,7 @@ public class ArrayUtil {
|
|||||||
if (isNotEmpty(args)) {
|
if (isNotEmpty(args)) {
|
||||||
for (Object element : args) {
|
for (Object element : args) {
|
||||||
if (ObjectUtil.isEmpty(element)) {
|
if (ObjectUtil.isEmpty(element)) {
|
||||||
return count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user