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 c1463ef  Refactor common code into a private method.
c1463ef is described below

commit c1463ef4646aeacb5e32e93eea69b20853f4920b
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Sun Sep 27 14:26:37 2020 -0400

    Refactor common code into a private method.
---
 .../apache/commons/io/filefilter/PrefixFileFilter.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

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 e02f0dd..a57af74 100644
--- a/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java
@@ -149,6 +149,15 @@ public class PrefixFileFilter extends AbstractFileFilter 
implements Serializable
         return accept(file.getName());
     }
 
+    private boolean accept(final String name) {
+        for (final String prefix : prefixes) {
+            if (caseSensitivity.checkStartsWith(name, prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     /**
      * Checks to see if the file name starts with the prefix.
      *
@@ -161,15 +170,6 @@ public class PrefixFileFilter extends AbstractFileFilter 
implements Serializable
         return accept(name);
     }
 
-    private boolean accept(final String name) {
-        for (final String prefix : prefixes) {
-            if (caseSensitivity.checkStartsWith(name, prefix)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     /**
      * Provide a String representation of this file filter.
      *

Reply via email to