-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
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:
- The expression language used in cache annotations can be error prone when referencing explict parameter names [SPR-9525] #14159 The expression language used in cache annotations can be error prone when referencing explict parameter names