Skip to content

Commit 78f9016

Browse files
committed
Merge branch '6.2.x'
# Conflicts: # spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
2 parents d3a5aef + b83e07f commit 78f9016

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,8 @@ protected void checkMergedBeanDefinition(RootBeanDefinition mbd, String beanName
10491049
protected @Nullable Boolean isCurrentThreadAllowedToHoldSingletonLock() {
10501050
String mainThreadPrefix = this.mainThreadPrefix;
10511051
if (mainThreadPrefix != null) {
1052-
// We only differentiate in the preInstantiateSingletons phase.
1052+
// We only differentiate in the preInstantiateSingletons phase, using
1053+
// the volatile mainThreadPrefix field as an indicator for that phase.
10531054

10541055
PreInstantiation preInstantiation = this.preInstantiationThread.get();
10551056
if (preInstantiation != null) {

spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.nio.file.FileSystems;
3737
import java.nio.file.FileVisitOption;
3838
import java.nio.file.Files;
39+
import java.nio.file.NoSuchFileException;
3940
import java.nio.file.Path;
4041
import java.util.Collections;
4142
import java.util.Enumeration;
@@ -871,9 +872,9 @@ protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
871872
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
872873
closeJarFile = !jarCon.getUseCaches();
873874
}
874-
catch (ZipException | FileNotFoundException ex) {
875+
catch (ZipException | FileNotFoundException | NoSuchFileException ex) {
875876
// Happens in case of a non-jar file or in case of a cached root directory
876-
// without specific subdirectory present, respectively.
877+
// without the specific subdirectory present, respectively.
877878
return Collections.emptySet();
878879
}
879880
}
@@ -1269,7 +1270,7 @@ private static String fixPath(String path) {
12691270
}
12701271

12711272
/**
1272-
* Return a alternative form of the resource, i.e. with or without a leading slash.
1273+
* Return an alternative form of the resource, i.e. with or without a leading slash.
12731274
* @param path the file path (with or without a leading slash)
12741275
* @return the alternative form or {@code null}
12751276
*/

0 commit comments

Comments
 (0)