Skip to content

Registering two beans at the same time throws ConcurrentModificationException [SPR-12503] #17108

@spring-projects-issues

Description

@spring-projects-issues

Lovro Mažgon opened SPR-12503 and commented

If two threads call the method DefaultListableBeanFactory#registerBeanDefinition at the same time, chances are that a ConcurrentModificationException will occur (for details see the StackOverflow answer). The problem is the List beanDefinitionNames, which is not thread-safe.

The bug was found in the version 3.2.2 but the same code persists until the latest version 4.1.2.


Affects: 3.2.2, 4.1.2

Reference URL: http://stackoverflow.com/questions/27280529/spring-registerbeandefinition-throws-java-util-concurrentmodificationexception/27280864#27280864

Issue Links:

Referenced from: commits 097bcfb

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