Treat Java 11+'s NoSuchFileException the same as FileNotFoundException

See gh-19850
This commit is contained in:
dreis2211
2020-01-22 11:10:40 +01:00
committed by Andy Wilkinson
parent adc6444272
commit 23e87f8266

View File

@@ -19,6 +19,7 @@ package org.springframework.boot.layertools;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.NoSuchFileException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -91,7 +92,7 @@ class IndexedLayers implements Layers {
}
return null;
}
catch (FileNotFoundException ex) {
catch (FileNotFoundException | NoSuchFileException ex) {
return null;
}
catch (IOException ex) {