You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/11/15 16:56:41 UTC

(commons-vfs) branch master updated (cf94eeaa -> 5fbc1700)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


    from cf94eeaa Bump github/codeql-action from 3.27.0 to 3.27.4 (#632)
     new 053478c2 It is OK to call java.io.File.listFiles(FileFilter) with a null argument
     new 5fbc1700 Javadoc: Use semantic tag <strong> instead of style tag <b>

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/commons/vfs2/RandomAccessContent.java     |  2 +-
 .../java/org/apache/commons/vfs2/cache/NullFilesCache.java    |  2 +-
 .../java/org/apache/commons/vfs2/filter/AgeFileFilter.java    |  4 ++--
 .../org/apache/commons/vfs2/filter/CanWriteFileFilter.java    |  2 +-
 .../java/org/apache/commons/vfs2/filter/SizeFileFilter.java   |  4 ++--
 .../vfs2/provider/sftp/SftpFileSystemConfigBuilder.java       |  2 +-
 .../java/org/apache/commons/vfs2/filter/BaseFilterTest.java   | 11 +----------
 7 files changed, 9 insertions(+), 18 deletions(-)


(commons-vfs) 02/02: Javadoc: Use semantic tag instead of style tag

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit 5fbc1700dc8544104028aca1650780bf952d5a14
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 15 11:56:36 2024 -0500

    Javadoc: Use semantic tag <strong> instead of style tag <b>
---
 .../src/main/java/org/apache/commons/vfs2/RandomAccessContent.java    | 2 +-
 .../src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java   | 2 +-
 .../src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java   | 4 ++--
 .../main/java/org/apache/commons/vfs2/filter/CanWriteFileFilter.java  | 2 +-
 .../src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java  | 4 ++--
 .../commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java       | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java
index 0bdaf160..b3f57185 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java
@@ -52,7 +52,7 @@ public interface RandomAccessContent extends DataOutput, DataInput, Closeable {
     /**
      * Gets the input stream.
      * <p>
-     * <b>Notice: If you use {@link #seek(long)} you have to re-get the InputStream</b>
+     * <strong>Notice: If you use {@link #seek(long)} you have to re-get the InputStream</strong>
      * </p>
      *
      * @return the InputStream.
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java
index cca6b515..075bf0d8 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java
@@ -26,7 +26,7 @@ import org.apache.commons.vfs2.FileSystem;
  * This implementation never ever caches a single file.
  * </p>
  * <p>
- * <b>Notice</b>: if you use resolveFile(uri) multiple times with the same path, the system will always create a new
+ * <strong>Notice</strong>: if you use resolveFile(uri) multiple times with the same path, the system will always create a new
  * instance. Changes on one instance of this file are not seen by the others.
  * </p>
  */
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java
index c8799954..ad5f26e8 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java
@@ -162,8 +162,8 @@ public class AgeFileFilter implements FileFilter, Serializable {
      * Checks to see if the last modification of the file matches cutoff favorably.
      * <p>
      * If last modification time equals cutoff and newer files are required, file
-     * <b>IS NOT</b> selected. If last modification time equals cutoff and older
-     * files are required, file <b>IS</b> selected.
+     * <strong>IS NOT</strong> selected. If last modification time equals cutoff and older
+     * files are required, file <strong>IS</strong> selected.
      * </p>
      *
      * @param fileInfo the File to check
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/CanWriteFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/CanWriteFileFilter.java
index acf7e461..5a35c18e 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/CanWriteFileFilter.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/CanWriteFileFilter.java
@@ -56,7 +56,7 @@ import org.apache.commons.vfs2.FileSystemException;
  * </pre>
  *
  * <p>
- * <b>N.B.</b> For read-only files, use
+ * <strong>N.B.</strong> For read-only files, use
  * {@code CanReadFileFilter.READ_ONLY}.
  * </p>
  *
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java
index abb70d64..c184fefd 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java
@@ -85,9 +85,9 @@ public class SizeFileFilter implements FileFilter, Serializable {
     /**
      * Checks to see if the size of the file is favorable.
      * <p>
-     * If size equals threshold and smaller files are required, file <b>IS NOT</b>
+     * If size equals threshold and smaller files are required, file <strong>IS NOT</strong>
      * selected. If size equals threshold and larger files are required, file
-     * <b>IS</b> selected.
+     * <strong>IS</strong> selected.
      * </p>
      * <p>
      * Non-existing files return always false (will never be accepted).
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
index be4539d5..521ccdfa 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
@@ -94,7 +94,7 @@ public final class SftpFileSystemConfigBuilder extends FileSystemConfigBuilder {
      * the VFS host.
      * </p>
      * <p>
-     * When used, the proxy username ({@linkplain #setProxyUser}) and hostname ({@linkplain #setProxyHost}) <b>must</b>
+     * When used, the proxy username ({@linkplain #setProxyUser}) and hostname ({@linkplain #setProxyHost}) <strong>must</strong>
      * be set. Optionally, the command ({@linkplain #setProxyCommand}), password ({@linkplain #setProxyPassword}) and
      * connection options ({@linkplain #setProxyOptions}) can be set.
      * </p>


(commons-vfs) 01/02: It is OK to call java.io.File.listFiles(FileFilter) with a null argument

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit 053478c245ae0f436467ca9789901121fc979b9c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 15 11:55:34 2024 -0500

    It is OK to call java.io.File.listFiles(FileFilter) with a null argument
    
    - See the Javadoc
    - Remove extra whitespace
---
 .../java/org/apache/commons/vfs2/filter/BaseFilterTest.java   | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java
index 9053728b..28a02a2e 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java
@@ -196,14 +196,7 @@ public abstract class BaseFilterTest {
      * @return List of child entries of the directory.
      */
     private static File[] listFiles(final File srcDir, final FileFilter filter) {
-
-        final File[] files;
-        if (filter == null) {
-            files = srcDir.listFiles();
-        } else {
-            files = srcDir.listFiles(filter);
-        }
-        return files;
+        return srcDir.listFiles(filter);
     }
 
     /**
@@ -222,7 +215,6 @@ public abstract class BaseFilterTest {
      */
     public static void zipDir(final File srcDir, final FileFilter filter, final String destPath, final File destFile)
             throws IOException {
-
         if (srcDir == null) {
             throw new IllegalArgumentException("srcDir cannot be null");
         }
@@ -235,7 +227,6 @@ public abstract class BaseFilterTest {
         if (destFile == null) {
             throw new IllegalArgumentException("destFile cannot be null");
         }
-
         try (ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(Files.newOutputStream(destFile.toPath())))) {
             zipDir(srcDir, filter, destPath, out);
         }