From a6e85613913408ab3f5f00876abcc51cc0848db4 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 19 Jun 2020 19:52:50 +0200 Subject: [PATCH] Catch more generic FileSystemException in NamedPipeSocket See gh-22035 --- .../boot/buildpack/platform/socket/NamedPipeSocket.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java index 81e0423258c9..edaa77392e8e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java @@ -26,7 +26,7 @@ import java.nio.channels.AsynchronousFileChannel; import java.nio.channels.Channels; import java.nio.channels.CompletionHandler; -import java.nio.file.NoSuchFileException; +import java.nio.file.FileSystemException; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.concurrent.CompletableFuture; @@ -64,7 +64,7 @@ private AsynchronousFileByteChannel open(String path) throws IOException { return new AsynchronousFileByteChannel(AsynchronousFileChannel.open(Paths.get(path), StandardOpenOption.READ, StandardOpenOption.WRITE)); } - catch (NoSuchFileException ex) { + catch (FileSystemException ex) { if (System.nanoTime() - startTime >= TIMEOUT) { throw ex; }