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 2020/09/02 16:03:08 UTC

[commons-io] branch master updated: In-line local var. Javadoc: Close paragraph tags. Format nits.

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-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e51ec0  In-line local var. Javadoc: Close paragraph tags. Format nits.
2e51ec0 is described below

commit 2e51ec0da5115a52fea2e3728e1f6065a2867464
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Sep 2 12:02:59 2020 -0400

    In-line local var. Javadoc: Close paragraph tags. Format nits.
---
 src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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 e509ba3..3bf5286 100644
--- a/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java
@@ -42,8 +42,10 @@ import java.io.Serializable;
 public class SizeFileFilter extends AbstractFileFilter implements Serializable {
 
     private static final long serialVersionUID = 7388077430788600069L;
+
     /** The size threshold. */
     private final long size;
+
     /** Whether the files accepted will be larger or smaller. */
     private final boolean acceptLarger;
 
@@ -75,7 +77,6 @@ public class SizeFileFilter extends AbstractFileFilter implements Serializable {
         this.acceptLarger = acceptLarger;
     }
 
-    //-----------------------------------------------------------------------
     /**
      * Checks to see if the size of the file is favorable.
      * <p>
@@ -83,14 +84,14 @@ public class SizeFileFilter extends AbstractFileFilter implements Serializable {
      * file <b>IS NOT</b> selected.
      * If size equals threshold and larger files are required,
      * file <b>IS</b> selected.
+     * </p>
      *
      * @param file  the File to check
      * @return true if the file name matches
      */
     @Override
     public boolean accept(final File file) {
-        final boolean smaller = file.length() < size;
-        return acceptLarger != smaller;
+        return acceptLarger != file.length() < size;
     }
 
     /**