Skip to content

Bad type comparison in ReflectionHelper.getTypeDifferenceWeight(List<TypeDescriptor> paramTypes, List<TypeDescriptor> argTypes) [SPR-11306] #15930

Closed
@spring-projects-issues

Description

@spring-projects-issues

Zoltan Farkas opened SPR-11306 and commented

Bad type comparison in

ReflectionHelper.getTypeDifferenceWeight(List<TypeDescriptor> paramTypes, List<TypeDescriptor> argTypes)

At line 132

if (paramType.equals(superClass)) {

This comparison will never be true since paramType class is not the same sa superClass class:

TypeDescriptor paramType = paramTypes.get(i);

and

Class<?> superClass = argType.getClass().getSuperclass();

This issue was highlighted by findbugs.


Affects: 3.2.6, 4.0 GA

Backported to: 3.2.7

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions