Spring-core-4.3.16
ObjectUtils.java
public static boolean isEmpty(Object obj) { if (obj == null) { return true; } else if (obj instanceof CharSequence) { return ((CharSequence)obj).length() == 0; } else if (obj.getClass().isArray()) { return Array.getLength(obj) == 0; } else if (obj instanceof Collection) { return ((Collection)obj).isEmpty(); } else { return obj instanceof Map ? ((Map)obj).isEmpty() : false; } }