Synthesize annotation arrays within AnnotationUtils
Issue: SPR-11393
This commit is contained in:
parent
75fe61843a
commit
2451594cdd
|
@ -219,7 +219,7 @@ public abstract class AnnotationUtils {
|
||||||
*/
|
*/
|
||||||
public static Annotation[] getAnnotations(AnnotatedElement annotatedElement) {
|
public static Annotation[] getAnnotations(AnnotatedElement annotatedElement) {
|
||||||
try {
|
try {
|
||||||
return annotatedElement.getAnnotations();
|
return synthesizeAnnotationArray(annotatedElement.getAnnotations(), annotatedElement);
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
handleIntrospectionFailure(annotatedElement, ex);
|
handleIntrospectionFailure(annotatedElement, ex);
|
||||||
|
@ -241,7 +241,7 @@ public abstract class AnnotationUtils {
|
||||||
*/
|
*/
|
||||||
public static Annotation[] getAnnotations(Method method) {
|
public static Annotation[] getAnnotations(Method method) {
|
||||||
try {
|
try {
|
||||||
return BridgeMethodResolver.findBridgedMethod(method).getAnnotations();
|
return synthesizeAnnotationArray(BridgeMethodResolver.findBridgedMethod(method).getAnnotations(), method);
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
handleIntrospectionFailure(method, ex);
|
handleIntrospectionFailure(method, ex);
|
||||||
|
@ -1811,6 +1811,9 @@ public abstract class AnnotationUtils {
|
||||||
this.declaredMode = declaredMode;
|
this.declaredMode = declaredMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 4.2
|
||||||
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
static Class<? extends Annotation> resolveContainerAnnotationType(Class<? extends Annotation> annotationType) {
|
static Class<? extends Annotation> resolveContainerAnnotationType(Class<? extends Annotation> annotationType) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue