Added missing handling of arrays in isEmpty function.

This commit is contained in:
Ziver Koc 2023-02-26 17:06:12 +01:00
parent 770e8bbe32
commit bd1bb168da
2 changed files with 4 additions and 0 deletions

View file

@ -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;