diff --git a/spring-core/src/main/java/org/springframework/util/ObjectUtils.java b/spring-core/src/main/java/org/springframework/util/ObjectUtils.java index 6e4c35924a95..07e338a7da4d 100644 --- a/spring-core/src/main/java/org/springframework/util/ObjectUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ObjectUtils.java @@ -138,6 +138,7 @@ public static boolean isEmpty(@Nullable Object[] array) { * @see CollectionUtils#isEmpty(java.util.Collection) * @see CollectionUtils#isEmpty(java.util.Map) */ + @Contract("null -> true") public static boolean isEmpty(@Nullable Object obj) { if (obj == null) { return true;