Skip to content

Commit 1227fe5

Browse files
committed
Polishing
1 parent ea41051 commit 1227fe5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-core/src/main/java/org/springframework/util/ObjectUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public abstract class ObjectUtils {
7070
private static final String ARRAY_ELEMENT_SEPARATOR = ", ";
7171
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
7272
private static final String NON_EMPTY_ARRAY = ARRAY_START + "..." + ARRAY_END;
73-
private static final String NON_EMPTY_COLLECTION = "[...]";
73+
private static final String COLLECTION = "[...]";
74+
private static final String MAP = NON_EMPTY_ARRAY;
7475

7576

7677
/**
@@ -952,11 +953,10 @@ public static String nullSafeConciseToString(@Nullable Object obj) {
952953
return (Array.getLength(obj) == 0 ? EMPTY_ARRAY : NON_EMPTY_ARRAY);
953954
}
954955
if (obj instanceof Collection) {
955-
return NON_EMPTY_COLLECTION;
956+
return COLLECTION;
956957
}
957958
if (obj instanceof Map) {
958-
// NON_EMPTY_ARRAY is also used for maps.
959-
return NON_EMPTY_ARRAY;
959+
return MAP;
960960
}
961961
if (obj instanceof Class<?> clazz) {
962962
return clazz.getName();

0 commit comments

Comments
 (0)