AnnotationUtils.getAnnotationAttributes makes Method accessible (analogous to AnnotationUtils.getValue)
Issue: SPR-12858
This commit is contained in:
@@ -583,6 +583,7 @@ public abstract class AnnotationUtils {
|
|||||||
for (Method method : methods) {
|
for (Method method : methods) {
|
||||||
if (method.getParameterTypes().length == 0 && method.getReturnType() != void.class) {
|
if (method.getParameterTypes().length == 0 && method.getReturnType() != void.class) {
|
||||||
try {
|
try {
|
||||||
|
ReflectionUtils.makeAccessible(method);
|
||||||
Object value = method.invoke(annotation);
|
Object value = method.invoke(annotation);
|
||||||
attrs.put(method.getName(), adaptValue(value, classValuesAsString, nestedAnnotationsAsMap));
|
attrs.put(method.getName(), adaptValue(value, classValuesAsString, nestedAnnotationsAsMap));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user