ReflectiveMethodResolver chooses parent class over child for static methods [SPR-13918] #18492
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Nikolay Martynov opened SPR-13918 and commented
Consider the following config:
ReflectiveMethodResolver first considers all methods from class Class then all methods from class Charset. Method "forName" from class Class is inserted into LinkedHashSet before the same method from class Charset.
Then ReflectiveMethodExecutor scans collection of methods from the beginning to end, finds matching method from class Class and calls it resulting in obvious error: classloader is requested to find a class with the name of the charset.
Instead ReflectiveMethodResolver should first consider methods from the class of the object before resorting to methods of class Class.
Affects: 3.2.16, 4.2.2
Issue Links:
Backported to: 3.2.17
The text was updated successfully, but these errors were encountered: