Closed
Description
Sam Brannen opened SPR-11104 and commented
Status Quo
The getValue()
methods in AnnotationUtils
currently fail to retrieve the value of the desired annotation attribute if the annotation itself is not public (i.e., package private). In contrast, the getDefaultValue()
methods work fine since they invoke Method#getDefaultValue()
. Thus the problem lies with the fact that AnnotationUtils.getValue(Annotation, String)
attempts to invoke the method, swallowing the exception on failure and silently returning null
.
Deliverables
- Update
AnnotationUtils.getValue(Annotation, String)
so that it uses reflection to make the desired annotation attribute method accessible before invoking it to retrieve the value.
Affects: 3.0 GA
Issue Links:
- Support meta-annotation attribute overrides in the TestContext framework [SPR-11038] #15666 Support meta-annotation attribute overrides in the TestContext framework ("is depended on by")
Referenced from: commits b830d73