From ef6986e516182d3e855bbf62a8caa96daa203b43 Mon Sep 17 00:00:00 2001 From: Axel Howind Date: Fri, 8 Dec 2023 06:22:44 +0100 Subject: [PATCH] code cleanup --- .../utility-logging-log4j/src/main/java/module-info.java | 1 - .../src/main/java/com/dua3/utility/swing/SwingUtil.java | 2 +- utility/src/main/java/com/dua3/utility/io/FileSystemView.java | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/utility-logging/utility-logging-log4j/src/main/java/module-info.java b/utility-logging/utility-logging-log4j/src/main/java/module-info.java index fe102e42..c3a24ae5 100644 --- a/utility-logging/utility-logging-log4j/src/main/java/module-info.java +++ b/utility-logging/utility-logging-log4j/src/main/java/module-info.java @@ -16,5 +16,4 @@ requires com.dua3.utility.logging; requires org.apache.logging.log4j; requires static org.apache.logging.log4j.core; - requires com.dua3.utility; } diff --git a/utility-swing/src/main/java/com/dua3/utility/swing/SwingUtil.java b/utility-swing/src/main/java/com/dua3/utility/swing/SwingUtil.java index ef98cd28..1fef8716 100644 --- a/utility-swing/src/main/java/com/dua3/utility/swing/SwingUtil.java +++ b/utility-swing/src/main/java/com/dua3/utility/swing/SwingUtil.java @@ -319,7 +319,7 @@ public static Optional showOpenDialog(Component parent, Path current, int } @SafeVarargs - private static Optional showFileDialog(Component parent, Path current, int selectionMode, BiFunction showDialog, + private static Optional showFileDialog(Component parent, Path current, int selectionMode, BiFunction showDialog, Pair... types) { File file; try { diff --git a/utility/src/main/java/com/dua3/utility/io/FileSystemView.java b/utility/src/main/java/com/dua3/utility/io/FileSystemView.java index c508ccf4..2a3df6b3 100644 --- a/utility/src/main/java/com/dua3/utility/io/FileSystemView.java +++ b/utility/src/main/java/com/dua3/utility/io/FileSystemView.java @@ -162,10 +162,8 @@ public static FileSystemView forClass(Class clazz) throws IOException { * * @param root the directory that will be root of this view * @return FileSystemView - * @throws IOException if the directory denoted by {@code path} does not exist - * or an I/O error occurs */ - public static FileSystemView forDirectory(Path root) throws IOException { + public static FileSystemView forDirectory(Path root) { return new FileSystemView(root, () -> { /* NOOP */ }, root.toString()); }