Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerate AnnotationUtils.isCandidateClass call with null as annotation type #30842

Closed
jhoeller opened this issue Jul 9, 2023 · 0 comments
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Jul 9, 2023

AnnotationUtils.isCandidateClass(Class<?> clazz, Class<? extends Annotation> annotationType) is being called from isCandidateClass(Class<?> clazz, Collection<Class<? extends Annotation>> annotationTypes) where the elements can potentially be null, for example in the case of incomplete InitDestroyAnnotationPostProcessor setup. The implementation should therefore defensively tolerate a null argument there and simply return false for it.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Jul 9, 2023
@jhoeller jhoeller added this to the 6.0.11 milestone Jul 9, 2023
@jhoeller jhoeller self-assigned this Jul 9, 2023
@jhoeller jhoeller added the for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x label Jul 9, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x labels Jul 9, 2023
jhoeller added a commit that referenced this issue Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant