Skip to content

Commit 1d33fd0

Browse files
committed
AnnotationUtils.getAnnotationAttributes makes Method accessible (analogous to AnnotationUtils.getValue)
Issue: SPR-12858
1 parent 14c891c commit 1d33fd0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ public static AnnotationAttributes getAnnotationAttributes(Annotation annotation
583583
for (Method method : methods) {
584584
if (method.getParameterTypes().length == 0 && method.getReturnType() != void.class) {
585585
try {
586+
ReflectionUtils.makeAccessible(method);
586587
Object value = method.invoke(annotation);
587588
attrs.put(method.getName(), adaptValue(value, classValuesAsString, nestedAnnotationsAsMap));
588589
}

0 commit comments

Comments
 (0)