spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

Prevent cache pollution by storing only the factories

Open philwebb opened this issue 8 months ago • 0 comments

Update SpringFactoriesLoader so that the cache stores only the factories and not the complete loader.

Prior to this commit, if a cache entry was added with the thread conect classloader, the loader instance would a added and the classloader stored. If the thread context classloader subsequently changes, and a call is made to forDefaultResourceLocation with null for the classloader, the cached entry would be used which contains the older classloader.

philwebb avatar Apr 09 '25 21:04 philwebb