summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java
index 1f757bd6aba..f43995602fa 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java
@@ -7,8 +7,6 @@ import java.io.UncheckedIOException;
import java.nio.file.NoSuchFileException;
import java.util.Optional;
-import static com.yahoo.yolean.Exceptions.uncheck;
-
/**
* Utils related to IOException.
*
@@ -19,9 +17,9 @@ public class IOExceptionUtil {
* Useful if it's not known whether a file or directory exists, in case e.g.
* NoSuchFileException is thrown and the caller wants an Optional.empty() in that case.
*/
- public static <T> Optional<T> ifExists(Exceptions.SupplierThrowingIOException<T> supplier) {
+ public static <T> Optional<T> ifExists(Exceptions.SupplierThrowingException<T> supplier) {
try {
- return Optional.ofNullable(uncheck(supplier));
+ return Optional.ofNullable(Exceptions.uncheck(supplier));
} catch (UncheckedIOException e) {
if (e.getCause() instanceof NoSuchFileException) {
return Optional.empty();