Merge branch '6.2.x'

# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
This commit is contained in:
Juergen Hoeller
2025-04-22 12:18:44 +02:00
2 changed files with 6 additions and 4 deletions

View File

@@ -1049,7 +1049,8 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
protected @Nullable Boolean isCurrentThreadAllowedToHoldSingletonLock() {
String mainThreadPrefix = this.mainThreadPrefix;
if (mainThreadPrefix != null) {
// We only differentiate in the preInstantiateSingletons phase.
// We only differentiate in the preInstantiateSingletons phase, using
// the volatile mainThreadPrefix field as an indicator for that phase.
PreInstantiation preInstantiation = this.preInstantiationThread.get();
if (preInstantiation != null) {