Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Generics and caching causing issues [SPR-13358] #17942
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.
Reference URL: https://github.com/arsuriya/spring-caching-generics