Closed
Description
Stéphane Nicoll opened SPR-12703 and commented
The following two calls do not yield consistent results when the method
is a method of a dynamic proxy.
AnnotatedElementUtils.getAnnotationAttributes(this.method, FooBar.class.getName());
The above returns null
; whereas, the following call on the same method returns the FooBar
annotation instance.
AnnotationUtils.findAnnotation(this.method, FooBar.class)
The code merged for #16696 has some TODOs in ApplicationListenerMethodAdapter
and tests that expose this behavior (removing the call to AnnotationUtils
will fail with a NullPointerException
).
Affects: 4.1 GA
Issue Links:
- AnnotationUtils does not support arbitrary levels of meta-annotations on methods [SPR-12941] #17534 AnnotationUtils does not support arbitrary levels of meta-annotations on methods
- Support composed annotations declared on interfaces [SPR-11108] #15734 Support composed annotations declared on interfaces
- AnnotatedElementUtils fails to find annotations on abstract, bridge, or interface methods [SPR-12738] #17335 AnnotatedElementUtils fails to find annotations on abstract, bridge, or interface methods
- AnnotatedElementUtils fails to find type-level annotations on interfaces [SPR-12944] #17537 AnnotatedElementUtils fails to find type-level annotations on interfaces