You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Sam Brannen opened SPR-11104 and commented
Status Quo
The
getValue()methods inAnnotationUtilscurrently fail to retrieve the value of the desired annotation attribute if the annotation itself is not public (i.e., package private). In contrast, thegetDefaultValue()methods work fine since they invokeMethod#getDefaultValue(). Thus the problem lies with the fact thatAnnotationUtils.getValue(Annotation, String)attempts to invoke the method, swallowing the exception on failure and silently returningnull.Deliverables
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:
Referenced from: commits b830d73