Merge branch '6.0.x'

# Conflicts:
#	spring-test/src/main/java/org/springframework/test/context/cache/DefaultCacheAwareContextLoaderDelegate.java
This commit is contained in:
Sam Brannen 2023-06-11 15:56:23 +02:00
commit b4ba80b09e
1 changed files with 44 additions and 41 deletions

View File

@ -135,6 +135,7 @@ public class DefaultCacheAwareContextLoaderDelegate implements CacheAwareContext
mergedConfig = replaceIfNecessary(mergedConfig);
synchronized (this.contextCache) {
ApplicationContext context = this.contextCache.get(mergedConfig);
try {
if (context == null) {
Integer failureCount = this.contextCache.getFailureCount(mergedConfig);
if (failureCount >= this.failureThreshold) {
@ -183,8 +184,10 @@ public class DefaultCacheAwareContextLoaderDelegate implements CacheAwareContext
System.identityHashCode(context), mergedConfig));
}
}
}
finally {
this.contextCache.logStatistics();
}
return context;
}