From 9df787a7686875c4ed59e7e2a35fd5f3d2a05b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Thu, 24 Nov 2022 07:53:17 +0100 Subject: [PATCH] Use Path in the Scanner API --- src/main/java/org/codehaus/plexus/util/DirectoryScanner.java | 5 +++-- src/main/java/org/codehaus/plexus/util/Scanner.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java b/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java index 5db6a903..421831d9 100644 --- a/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java +++ b/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java @@ -56,6 +56,7 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; @@ -236,9 +237,9 @@ public void setBasedir( File basedir ) * @return the base directory to be scanned */ @Override - public File getBasedir() + public Path getBasedir() { - return basedir; + return basedir.toPath(); } /** diff --git a/src/main/java/org/codehaus/plexus/util/Scanner.java b/src/main/java/org/codehaus/plexus/util/Scanner.java index 20bf85fb..25477574 100644 --- a/src/main/java/org/codehaus/plexus/util/Scanner.java +++ b/src/main/java/org/codehaus/plexus/util/Scanner.java @@ -16,7 +16,7 @@ * limitations under the License. */ -import java.io.File; +import java.nio.file.Path; import java.util.Comparator; /** @@ -83,7 +83,7 @@ public interface Scanner * * @return the base directory to be scanned */ - File getBasedir(); + Path getBasedir(); /** * Use a filename comparator in each directory when scanning.