Skip to content

Avoid exceptions in ReflectionUtils.isObjectMethod(…) #22730

@odrotbohm

Description

@odrotbohm

Currently, ReflectionUtils.isObjectMethod(…) calls Object.class.getDeclaredMethod(…), which, for every method that is not an object method, will cause an exception being thrown. I.e. if you call that method heavily with non-Object methods, you create a lot of exceptions.

I suggest to replace that method lookup by a Map lookup of all Object methods by name (with their parameter type arrays as value for subsequent comparison on a hit of the first lookup).

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions