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

AbstractRecursiveAnnotationVisitor can't access a package protected enum value [SPR-15442] #20003

Closed
spring-projects-issues opened this issue Apr 12, 2017 · 0 comments
Assignees
Labels
in: core type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Apr 12, 2017

Stéphane Nicoll opened SPR-15442 and commented

This issue popped up all the sudden on boot master:

java.lang.IllegalAccessException: Class org.springframework.core.type.classreading.AbstractRecursiveAnnotationVisitor can not access a member of class org.springframework.boot.test.autoconfigure.properties.AnnotationsPropertySourceTests$EnumItem with modifiers "public static final"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) ~[na:1.8.0_121]
	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296) ~[na:1.8.0_121]
	at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288) ~[na:1.8.0_121]
	at java.lang.reflect.Field.get(Field.java:390) ~[na:1.8.0_121]
	at org.springframework.core.type.classreading.AbstractRecursiveAnnotationVisitor.getEnumValue(AbstractRecursiveAnnotationVisitor.java:83) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.core.type.classreading.AbstractRecursiveAnnotationVisitor.visitEnum(AbstractRecursiveAnnotationVisitor.java:73) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.asm.ClassReader.readAnnotationValue(ClassReader.java:1936) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:1861) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.asm.ClassReader.accept(ClassReader.java:657) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.asm.ClassReader.accept(ClassReader.java:523) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:64) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:98) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:121) [spring-core-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:411) [spring-context-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:295) [spring-context-5.0.0.BUILD-20170411.214407-103.jar:5.0.0.BUILD-SNAPSHOT]

Affects: 4.3.7

Referenced from: commits 4838f06, 40232f4, 093e573

@spring-projects-issues spring-projects-issues added type: bug in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.3.8 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: bug
Projects
None yet
Development

No branches or pull requests

2 participants