Merge branch '6.2.x'
# Conflicts: # spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
This commit is contained in:
commit
78f901649e
|
@ -1049,7 +1049,8 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
||||||
protected @Nullable Boolean isCurrentThreadAllowedToHoldSingletonLock() {
|
protected @Nullable Boolean isCurrentThreadAllowedToHoldSingletonLock() {
|
||||||
String mainThreadPrefix = this.mainThreadPrefix;
|
String mainThreadPrefix = this.mainThreadPrefix;
|
||||||
if (mainThreadPrefix != null) {
|
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();
|
PreInstantiation preInstantiation = this.preInstantiationThread.get();
|
||||||
if (preInstantiation != null) {
|
if (preInstantiation != null) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import java.nio.file.FileSystemNotFoundException;
|
||||||
import java.nio.file.FileSystems;
|
import java.nio.file.FileSystems;
|
||||||
import java.nio.file.FileVisitOption;
|
import java.nio.file.FileVisitOption;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.NoSuchFileException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
@ -871,9 +872,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
||||||
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
|
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
|
||||||
closeJarFile = !jarCon.getUseCaches();
|
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
|
// 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();
|
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)
|
* @param path the file path (with or without a leading slash)
|
||||||
* @return the alternative form or {@code null}
|
* @return the alternative form or {@code null}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue