Skip to content

Support package private annotations with AnnotationUtils [SPR-12858] #17456

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

Closed
spring-projects-issues opened this issue Mar 27, 2015 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 27, 2015

Phil Webb opened SPR-12858 and commented

AnnotationUtils.getAnnotationAttributes currently doesn't work with package scope annotations.

I believe that calling method.setAccessible(true) when iterating the methods would solve the issue.

https://github.com/spring-projects/spring-framework/blob/master/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java#L586


Affects: 4.1.6

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Since we are calling setAccessible for similar invocations in AnnotationUtils, this is arguably a consistency issue. I'll therefore backport this to 4.1.7 as well.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants