modify isEmpty(Object array)

修复判空异常
This commit is contained in:
Liang Long 2020-07-02 16:45:13 +08:00 committed by GitHub
parent a7fe161a57
commit 1ef749bf38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,12 +66,13 @@ public class ArrayUtil {
* @return 是否为空
*/
public static boolean isEmpty(Object array) {
if (null == array) {
return true;
} else if (isArray(array)) {
return 0 == Array.getLength(array);
if (array != null) {
if (isArray(array)) {
return 0 == Array.getLength(array);
}
return false;
}
throw new UtilException("Object to provide is not a Array !");
return true;
}
/**