From 75898bc6502d288bee95fa42229cf3fd4666691f Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 11 Nov 2024 15:55:18 -0500 Subject: [PATCH] Javadoc: Add missing @param --- src/main/java/org/apache/commons/io/file/PathFilter.java | 2 +- .../org/apache/commons/io/filefilter/AgeFileFilter.java | 3 ++- .../commons/io/filefilter/CanExecuteFileFilter.java | 3 ++- .../apache/commons/io/filefilter/CanReadFileFilter.java | 3 ++- .../apache/commons/io/filefilter/CanWriteFileFilter.java | 3 ++- .../commons/io/filefilter/DirectoryFileFilter.java | 3 ++- .../apache/commons/io/filefilter/EmptyFileFilter.java | 3 ++- .../apache/commons/io/filefilter/FalseFileFilter.java | 2 +- .../org/apache/commons/io/filefilter/FileFileFilter.java | 3 ++- .../apache/commons/io/filefilter/HiddenFileFilter.java | 6 +++--- .../org/apache/commons/io/filefilter/IOFileFilter.java | 1 + .../commons/io/filefilter/MagicNumberFileFilter.java | 4 ++-- .../org/apache/commons/io/filefilter/NameFileFilter.java | 3 ++- .../org/apache/commons/io/filefilter/NotFileFilter.java | 3 ++- .../apache/commons/io/filefilter/PrefixFileFilter.java | 3 ++- .../apache/commons/io/filefilter/RegexFileFilter.java | 2 +- .../org/apache/commons/io/filefilter/SizeFileFilter.java | 9 ++++----- .../apache/commons/io/filefilter/SuffixFileFilter.java | 3 ++- .../commons/io/filefilter/SymbolicLinkFileFilter.java | 1 + .../org/apache/commons/io/filefilter/TrueFileFilter.java | 3 ++- .../apache/commons/io/filefilter/WildcardFileFilter.java | 2 +- .../org/apache/commons/io/filefilter/WildcardFilter.java | 3 ++- 22 files changed, 41 insertions(+), 27 deletions(-) diff --git a/src/main/java/org/apache/commons/io/file/PathFilter.java b/src/main/java/org/apache/commons/io/file/PathFilter.java index 837ddc02781..e8727760e7f 100644 --- a/src/main/java/org/apache/commons/io/file/PathFilter.java +++ b/src/main/java/org/apache/commons/io/file/PathFilter.java @@ -33,7 +33,7 @@ public interface PathFilter { * Tests whether or not to include the specified Path in a result. * * @param path The Path to test. - * @param attributes the file's basic attributes (TODO may be null). + * @param attributes the path's basic attributes (may be null). * @return a FileVisitResult */ FileVisitResult accept(Path path, BasicFileAttributes attributes); diff --git a/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java index 095571c9c6b..826349bee54 100644 --- a/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java @@ -193,8 +193,9 @@ public boolean accept(final File file) { * If last modification time equals cutoff and newer files are required, file IS NOT selected. If last * modification time equals cutoff and older files are required, file IS selected. *

- * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file name matches * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java index ba686c3cbe8..cd51c5dda6d 100644 --- a/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java @@ -87,8 +87,9 @@ public boolean accept(final File file) { /** * Checks to see if the file can be executed. - * @param file the File to check. * + * @param file the File to check. + * @param attributes the path's basic attributes (may be null). * @return {@code true} if the file can be executed, otherwise {@code false}. * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java index 1526627405e..7a320f52ba3 100644 --- a/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java @@ -97,8 +97,9 @@ public boolean accept(final File file) { /** * Checks to see if the file can be read. - * @param file the File to check. * + * @param file the File to check. + * @param attributes the path's basic attributes (may be null). * @return {@code true} if the file can be read, otherwise {@code false}. * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java index a9ec2dc4e55..7a2d8c2a78a 100644 --- a/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java @@ -85,8 +85,9 @@ public boolean accept(final File file) { /** * Checks to see if the file can be written to. - * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return {@code true} if the file can be written to, otherwise {@code false}. * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java index 04ee88585af..cf2cdf8a628 100644 --- a/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java @@ -102,8 +102,9 @@ public boolean accept(final File file) { /** * Checks to see if the file is a directory. - * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file is a directory * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java index d536cb3f61b..a567ead927e 100644 --- a/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java @@ -116,8 +116,9 @@ public boolean accept(final File file) { /** * Checks to see if the file is empty. - * @param file the file or directory to check * + * @param file the file or directory to check + * @param attributes the path's basic attributes (may be null). * @return {@code true} if the file or directory is empty, otherwise {@code false}. * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java index 9ffb2ab6769..5852b37c746 100644 --- a/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java @@ -84,7 +84,7 @@ public boolean accept(final File dir, final String name) { * Returns false. * * @param file the file to check (ignored) - * + * @param attributes the path's basic attributes (may be null). * @return false * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java index d75c397155b..9f0cec6b4cf 100644 --- a/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java @@ -102,8 +102,9 @@ public boolean accept(final File file) { /** * Checks to see if the file is a file. - * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file is a file * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java index c7a312897cf..2ebc70a9f08 100644 --- a/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java @@ -106,10 +106,10 @@ public boolean accept(final File file) { /** * Checks to see if the file is hidden. - * @param file the File to check * - * @return {@code true} if the file is - * hidden, otherwise {@code false}. + * @param file the File to check + * @param attributes the path's basic attributes (may be null). + * @return {@code true} if the file is hidden, otherwise {@code false}. * @since 2.9.0 */ @Override diff --git a/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java index 682bf43e72e..528527c05f5 100644 --- a/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java @@ -67,6 +67,7 @@ public interface IOFileFilter extends FileFilter, FilenameFilter, PathFilter, Pa * Checks to see if a Path should be accepted by this filter. * * @param path the Path to check. + * @param attributes the path's basic attributes (may be null). * @return true if this path matches the test. * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java index 68ea69c6da6..79b50fbcc1a 100644 --- a/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java @@ -276,13 +276,13 @@ public boolean accept(final File file) { * Accepts the provided file if the file contains the file filter's magic * number at the specified offset. *

- * *

* If any {@link IOException}s occur while reading the file, the file will * be rejected. + * *

* @param file the file to accept or reject. - * + * @param attributes the path's basic attributes (may be null). * @return {@code true} if the file contains the filter's magic number * at the specified offset, {@code false} otherwise. * @since 2.9.0 diff --git a/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java index 27569febb3a..c6adbc659ea 100644 --- a/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java @@ -180,8 +180,9 @@ public boolean accept(final File dir, final String name) { /** * Checks to see if the file name matches. - * @param path the File to check * + * @param path the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file name matches * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java index e61081bc960..386bfaaa75a 100644 --- a/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java @@ -76,8 +76,9 @@ public boolean accept(final File file, final String name) { /** * Returns the logical NOT of the underlying filter's return value for the same File. - * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the filter returns false * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java index c2e9f05553c..633bd7881c3 100644 --- a/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java @@ -185,8 +185,9 @@ public boolean accept(final File file, final String name) { /** * Checks to see if the file name starts with the prefix. - * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file name starts with one of our prefixes * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java index b72b1a5c147..ed939b672dd 100644 --- a/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java @@ -177,7 +177,7 @@ public boolean accept(final File dir, final String name) { * Checks to see if the file name matches one of the regular expressions. * * @param path the path - * @param attributes the path attributes + * @param attributes the path's basic attributes (may be null). * @return true if the file name matches one of the regular expressions */ @Override diff --git a/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java index 8fd73282f41..b9c9cfebd06 100644 --- a/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java @@ -130,13 +130,12 @@ private boolean accept(final long length) { /** * Checks to see if the size of the file is favorable. *

- * If size equals threshold and smaller files are required, - * file IS NOT selected. - * If size equals threshold and larger files are required, - * file IS selected. + * If size equals threshold and smaller files are required, file IS NOT selected. If size equals threshold and larger files are required, file + * IS selected. *

- * @param file the File to check * + * @param file the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file name matches */ @Override diff --git a/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java index ac03da1ae47..d0411a3a601 100644 --- a/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java @@ -186,8 +186,9 @@ public boolean accept(final File file, final String name) { /** * Checks to see if the file name ends with the suffix. - * @param path the File to check * + * @param path the File to check + * @param attributes the path's basic attributes (may be null). * @return true if the file name ends with one of our suffixes * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java index ecf87efb4b0..f2129fad260 100644 --- a/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java @@ -120,6 +120,7 @@ public boolean accept(final File file) { * Checks to see if the file is a symbolic link. * * @param path the File Path to check + * @param attributes the path's basic attributes (may be null). * @return {@code onAccept} from {@link #SymbolicLinkFileFilter(FileVisitResult, FileVisitResult)} if the file exists and is a symbolic link to either * another file or a directory; returns {@code onReject} otherwise. */ diff --git a/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java index e48d80a1432..4ce988443cd 100644 --- a/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java @@ -82,8 +82,9 @@ public boolean accept(final File dir, final String name) { /** * Returns true. - * @param file the file to check (ignored) * + * @param file the file to check (ignored) + * @param attributes the path's basic attributes (may be null). * @return true * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java index be687bccc94..1af18307375 100644 --- a/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java @@ -276,7 +276,7 @@ public boolean accept(final File dir, final String name) { * Checks to see if the file name matches one of the wildcards. * * @param path the file to check - * + * @param attributes the path's basic attributes (may be null). * @return true if the file name matches one of the wildcards. * @since 2.9.0 */ diff --git a/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java b/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java index 477a77f5815..3b2ad11f8b7 100644 --- a/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java @@ -155,8 +155,9 @@ public boolean accept(final File dir, final String name) { /** * Checks to see if the file name matches one of the wildcards. - * @param path the file to check * + * @param path the file to check + * @param attributes the path's basic attributes (may be null). * @return true if the file name matches one of the wildcards * @since 2.9.0 */