Skip to content

Generics and caching causing issues [SPR-13358] #17942

@spring-projects-issues

Description

@spring-projects-issues

Abdul Rahim Suriya opened SPR-13358 and commented

The LazyParamAwareEvaluationContext caches the java.lang.reflect.Method instance on which the Caching annotations are present against a (programmatically generated) method signature.

This causes issue with generics in an interface hierarchy. If not a fix in the code, a documentation update should help in warning under certain circumstances. In fact the default recommendation can be to use the #root.args[] or #a0, #p0 for referring to method parameters rather than by name (which would also not be available in cases where compilation step did not include debug information)

The referenced github project is a sample that helps reproduce the issue and also provides recommendation for the fix in such scenario.


Affects: 3.2.14

Reference URL: https://github.com/arsuriya/spring-caching-generics

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions