Skip to content

Commit ae3bdc7

Browse files
committed
Merge pull request #19850 from dreis2211
* gh-19850: Treat Java 11+'s NoSuchFileException the same as FileNotFoundException Closes gh-19850
2 parents adc6444 + 23e87f8 commit ae3bdc7

File tree

1 file changed

+2
-1
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-layertools/src/main/java/org/springframework/boot/layertools

1 file changed

+2
-1
lines changed

spring-boot-project/spring-boot-tools/spring-boot-layertools/src/main/java/org/springframework/boot/layertools/IndexedLayers.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.io.FileNotFoundException;
2020
import java.io.IOException;
2121
import java.nio.charset.StandardCharsets;
22+
import java.nio.file.NoSuchFileException;
2223
import java.util.ArrayList;
2324
import java.util.Arrays;
2425
import java.util.Iterator;
@@ -91,7 +92,7 @@ static IndexedLayers get(Context context) {
9192
}
9293
return null;
9394
}
94-
catch (FileNotFoundException ex) {
95+
catch (FileNotFoundException | NoSuchFileException ex) {
9596
return null;
9697
}
9798
catch (IOException ex) {

0 commit comments

Comments
 (0)