Annotations on generic interface methods not found by AnnotationUtils [SPR-16060] #20609
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Christopher Rued opened SPR-16060 and commented
When scanning for annotations on a class that implements a generic interface where the generic
type is specified in the implementing class, annotation scanning would fail to identify annotations
from the interface since the parameter types do not match.
For example, given an interface:
and a class:
when scanning StringFoo.foo for annotations, no annotations were identified.
This commit changes annotation scanning so that when scanning for annotations, the parameters are
compared for assignability (using Class.isAssignableFrom()) rather than requiring exact matches.
Original Issue: SEC-3081
Issue Links:
Referenced from: pull request #1553, and commits 23d4862, b72594d
The text was updated successfully, but these errors were encountered: