Synthesize annotation arrays within AnnotationUtils

Issue: SPR-11393
master
Sam Brannen 9 years ago
parent 75fe61843a
commit 2451594cdd
  1. 7
      spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java

@ -219,7 +219,7 @@ public abstract class AnnotationUtils {
*/
public static Annotation[] getAnnotations(AnnotatedElement annotatedElement) {
try {
return annotatedElement.getAnnotations();
return synthesizeAnnotationArray(annotatedElement.getAnnotations(), annotatedElement);
}
catch (Exception ex) {
handleIntrospectionFailure(annotatedElement, ex);
@ -241,7 +241,7 @@ public abstract class AnnotationUtils {
*/
public static Annotation[] getAnnotations(Method method) {
try {
return BridgeMethodResolver.findBridgedMethod(method).getAnnotations();
return synthesizeAnnotationArray(BridgeMethodResolver.findBridgedMethod(method).getAnnotations(), method);
}
catch (Exception ex) {
handleIntrospectionFailure(method, ex);
@ -1811,6 +1811,9 @@ public abstract class AnnotationUtils {
this.declaredMode = declaredMode;
}
/**
* @since 4.2
*/
@SuppressWarnings("unchecked")
static Class<? extends Annotation> resolveContainerAnnotationType(Class<? extends Annotation> annotationType) {
try {

Loading…
Cancel
Save