Added missing handling of arrays in isEmpty function.
This commit is contained in:
parent
770e8bbe32
commit
bd1bb168da
2 changed files with 4 additions and 0 deletions
|
|
@ -58,6 +58,8 @@ public class ObjectUtil {
|
|||
return ((Map) obj).isEmpty();
|
||||
else if (obj instanceof List)
|
||||
return ((List) obj).isEmpty();
|
||||
else if (obj.getClass().isArray())
|
||||
return ((Object[]) obj).length == 0;
|
||||
else if (obj instanceof CharSequence)
|
||||
return ((CharSequence) obj).length() == 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue