Browse Source

Add missing `@Contract` annotation to ObjectUtils#isEmpty

Closes gh-33984
pull/34398/head
Sébastien Deleuze 1 year ago
parent
commit
ddec8d2653
  1. 1
      spring-core/src/main/java/org/springframework/util/ObjectUtils.java

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

@ -138,6 +138,7 @@ public abstract class ObjectUtils { @@ -138,6 +138,7 @@ public abstract class ObjectUtils {
* @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;

Loading…
Cancel
Save