You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using AnnotationUtils.isAnnotationMetaPresent(…) for annotation discovery fails to report that NonNullApi is a meta-annotation for javax.annotation.Nonnull.
We have the same issue for meta-annotations originating from JSR305, e.g. javax.annotation.ParametersAreNonnullByDefault. This is a meta-annotation for javax.annotation.Nonnull. Do you want to fix the issue with the same ticket or should we create a new ticket?
jhoeller
changed the title
AnnotationUtils.isAnnotationMetaPresent(…) no longer considers NonNullApi as meta annotation for javax.annotation.Nonnull
AnnotationUtils.isAnnotationMetaPresent(…) no longer considers javax.annotation.Nonnull
Mar 27, 2019
A quick note: AnnotationUtils.isAnnotationMetaPresent is deprecated as of 5.2, along with several other too-specific utility methods. Alternatively, for a unified method, AnnotatedElementUtils.isAnnotated (which covers meta-annotations as well) remains non-deprecated.
Consider the following code in which a package is annotated with
@NonNullApi
:package-info.java
Reproducer
Using
AnnotationUtils.isAnnotationMetaPresent(…)
for annotation discovery fails to report thatNonNullApi
is a meta-annotation forjavax.annotation.Nonnull
.Spring Data uses JSR 305-based nullability inference for repository method arguments and return value inspection
The text was updated successfully, but these errors were encountered: