Browse Source

Merge branch '6.2.x'

# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
pull/34799/head
Juergen Hoeller 11 months ago
parent
commit
78f901649e
  1. 3
      spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
  2. 7
      spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

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

@ -1049,7 +1049,8 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto @@ -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) {

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

@ -36,6 +36,7 @@ import java.nio.file.FileSystemNotFoundException; @@ -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 @@ -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 @@ -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}
*/

Loading…
Cancel
Save