Skip to content

Commit ddec8d2

Browse files
committedNov 28, 2024
Add missing @Contract annotation to ObjectUtils#isEmpty
Closes gh-33984
1 parent 1aede29 commit ddec8d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

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

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public static boolean isEmpty(@Nullable Object[] array) {
138138
* @see CollectionUtils#isEmpty(java.util.Collection)
139139
* @see CollectionUtils#isEmpty(java.util.Map)
140140
*/
141+
@Contract("null -> true")
141142
public static boolean isEmpty(@Nullable Object obj) {
142143
if (obj == null) {
143144
return true;

0 commit comments

Comments
 (0)