Skip to content

Memory leak in CommonAnnotationBeanPostProcessor [SPR-17127] #21664

@spring-projects-issues

Description

@spring-projects-issues

Timur Strekalov opened SPR-17127 and commented

org.springframework.context.annotation.CommonAnnotationBeanPostProcessor#findResourceMetadata puts metadata into the org.springframework.context.annotation.CommonAnnotationBeanPostProcessor#injectionMetadataCache, but nothing ever cleans it, leading to a memory leak in case bean definitions for beans with different names get added and removed. This is particularly visible when using Spring Integration's dynamic flows.

Note that this issue could be considered a duplicate of #21663, since the code for findResourceMetadata and findAutowiringMetadata is exactly the same, but I figured I'd report two separate issues anyway.


Affects: 5.0.8

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions