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
commit 78f901649e
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) {

View File

@ -36,6 +36,7 @@ import java.nio.file.FileSystemNotFoundException;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitOption;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.util.Collections;
import java.util.Enumeration;
@ -871,9 +872,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
closeJarFile = !jarCon.getUseCaches();
}
catch (ZipException | FileNotFoundException ex) {
catch (ZipException | FileNotFoundException | NoSuchFileException ex) {
// Happens in case of a non-jar file or in case of a cached root directory
// without specific subdirectory present, respectively.
// without the specific subdirectory present, respectively.
return Collections.emptySet();
}
}
@ -1269,7 +1270,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
}
/**
* Return a alternative form of the resource, i.e. with or without a leading slash.
* Return an alternative form of the resource, i.e. with or without a leading slash.
* @param path the file path (with or without a leading slash)
* @return the alternative form or {@code null}
*/