Synthesize annotation arrays within AnnotationUtils

Issue: SPR-11393
This commit is contained in:
Sam Brannen 2015-06-23 18:30:47 +02:00
parent 75fe61843a
commit 2451594cdd
1 changed files with 5 additions and 2 deletions

View File

@ -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 {