diff --git a/spring-core/src/main/java/org/springframework/core/Nullness.java b/spring-core/src/main/java/org/springframework/core/Nullness.java index 3dd7c1265d5..5e4cac0ba15 100644 --- a/spring-core/src/main/java/org/springframework/core/Nullness.java +++ b/spring-core/src/main/java/org/springframework/core/Nullness.java @@ -42,8 +42,11 @@ import org.jspecify.annotations.Nullable; *

The nullness applies to a type usage, a field, a method return type or a parameter. * JSpecify annotations are fully supported, as well as * Kotlin null safety, {@code @Nullable} annotations - * regardless of their package (from Spring, JSR-305 or Jakarta set of annotations for example) and Java primitive - * types. + * regardless of their package and Java primitive types. + * + *

JSR-305 annotations as well as Spring ones in the {@code org.springframework.lang} packages such as + * {@code @NonNullApi}, {@code @NonNullFields} and {@code @NonNull} are not supported by this API, except + * {@code @Nullable} which is supported via the package-less check. Migrating to JSpecify is recommended. * * @author Sebastien Deleuze * @since 7.0