Merge branch '6.0.x'

This commit is contained in:
Sam Brannen
2023-09-08 16:31:11 +02:00

View File

@@ -59,7 +59,8 @@ public abstract class ObjectUtils {
private static final String ARRAY_ELEMENT_SEPARATOR = ", ";
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
private static final String NON_EMPTY_ARRAY = ARRAY_START + "..." + ARRAY_END;
private static final String NON_EMPTY_COLLECTION = "[...]";
private static final String COLLECTION = "[...]";
private static final String MAP = NON_EMPTY_ARRAY;
/**
@@ -945,11 +946,10 @@ public abstract class ObjectUtils {
return (Array.getLength(obj) == 0 ? EMPTY_ARRAY : NON_EMPTY_ARRAY);
}
if (obj instanceof Collection) {
return NON_EMPTY_COLLECTION;
return COLLECTION;
}
if (obj instanceof Map) {
// NON_EMPTY_ARRAY is also used for maps.
return NON_EMPTY_ARRAY;
return MAP;
}
if (obj instanceof Class<?> clazz) {
return clazz.getName();