commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r584359 - in /commons/proper/io/trunk: ./ src/java/org/apache/commons/io/filefilter/ src/test/org/apache/commons/io/filefilter/
Date Sat, 13 Oct 2007 01:34:43 GMT
Author: niallp
Date: Fri Oct 12 18:34:42 2007
New Revision: 584359

URL: http://svn.apache.org/viewvc?rev=584359&view=rev
Log:
IO-74 Rename RegexFilter to RegexFileFilter to conform to the naming convention of other implementations

Added:
    commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java
      - copied, changed from r584354, commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFilter.java
Removed:
    commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFilter.java
Modified:
    commons/proper/io/trunk/RELEASE-NOTES.txt
    commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java

Modified: commons/proper/io/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/RELEASE-NOTES.txt?rev=584359&r1=584358&r2=584359&view=diff
==============================================================================
--- commons/proper/io/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/io/trunk/RELEASE-NOTES.txt Fri Oct 12 18:34:42 2007
@@ -38,7 +38,7 @@
 - SuffixFileFilter [IO-126]
   - Add faciltiy to specify case sensitivty on suffix matching
 
-- RegexFilter [IO-74]
+- RegexFileFilter [IO-74]
   - Add new regular expression file filter implementation
 
 - New Closed Input/Output stream implementations [IO-122]

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java?rev=584359&r1=584358&r2=584359&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
(original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
Fri Oct 12 18:34:42 2007
@@ -289,7 +289,7 @@
      * @since Commons IO 1.4
      */
     public static IOFileFilter regex(String pattern) {
-        return new RegexFilter(pattern);
+        return new RegexFileFilter(pattern);
     }
 
     /**
@@ -302,7 +302,7 @@
      * @since Commons IO 1.4
      */
     public static IOFileFilter regex(String pattern, IOCase caseSensitivity) {
-        return new RegexFilter(pattern, caseSensitivity);
+        return new RegexFileFilter(pattern, caseSensitivity);
     }
 
     /**
@@ -315,7 +315,7 @@
      * @since Commons IO 1.4
      */
     public static IOFileFilter regex(String pattern, int flags) {
-        return new RegexFilter(pattern, flags);
+        return new RegexFileFilter(pattern, flags);
     }
 
     //-----------------------------------------------------------------------

Copied: commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java
(from r584354, commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFilter.java)
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java?p2=commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java&p1=commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFilter.java&r1=584354&r2=584359&rev=584359&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFilter.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java
Fri Oct 12 18:34:42 2007
@@ -30,7 +30,7 @@
  * e.g.
  * <pre>
  * File dir = new File(".");
- * FileFilter fileFilter = new RegexFilter("^.*[tT]est(-\\d+)?\\.java$");
+ * FileFilter fileFilter = new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$");
  * File[] files = dir.listFiles(fileFilter);
  * for (int i = 0; i < files.length; i++) {
  *   System.out.println(files[i]);
@@ -41,7 +41,7 @@
  * @version $Revision$
  * @since Commons IO 1.4
  */
-public class RegexFilter extends AbstractFileFilter {
+public class RegexFileFilter extends AbstractFileFilter {
 
     /** The regular expression pattern that will be used to match filenames */
     private Pattern pattern;
@@ -52,7 +52,7 @@
      * @param pattern regular string expression to match
      * @throws IllegalArgumentException if the pattern is null
      */
-    public RegexFilter(String pattern) {
+    public RegexFileFilter(String pattern) {
         if (pattern == null) {
             throw new IllegalArgumentException("Pattern is missing");
         }
@@ -67,7 +67,7 @@
      * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
      * @throws IllegalArgumentException if the pattern is null
      */
-    public RegexFilter(String pattern, IOCase caseSensitivity) {
+    public RegexFileFilter(String pattern, IOCase caseSensitivity) {
         if (pattern == null) {
             throw new IllegalArgumentException("Pattern is missing");
         }
@@ -85,7 +85,7 @@
      * @param flags pattern flags - e.g. {@link Pattern#CASE_INSENSITIVE}
      * @throws IllegalArgumentException if the pattern is null
      */
-    public RegexFilter(String pattern, int flags) {
+    public RegexFileFilter(String pattern, int flags) {
         if (pattern == null) {
             throw new IllegalArgumentException("Pattern is missing");
         }
@@ -98,7 +98,7 @@
      * @param pattern regular expression to match
      * @throws IllegalArgumentException if the pattern is null
      */
-    public RegexFilter(Pattern pattern) {
+    public RegexFileFilter(Pattern pattern) {
         if (pattern == null) {
             throw new IllegalArgumentException("Pattern is missing");
         }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java?rev=584359&r1=584358&r2=584359&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
Fri Oct 12 18:34:42 2007
@@ -833,7 +833,7 @@
         assertFiltering(filter, new File("test.java"), true);
         assertFiltering(filter, new File("tEST.java"), false);
 
-        filter = new RegexFilter(Pattern.compile("^test.java$", Pattern.CASE_INSENSITIVE));
+        filter = new RegexFileFilter(Pattern.compile("^test.java$", Pattern.CASE_INSENSITIVE));
         assertFiltering(filter, new File("Test.java"), true);
         assertFiltering(filter, new File("test.java"), true);
         assertFiltering(filter, new File("tEST.java"), true);
@@ -870,7 +870,7 @@
         }
 
         try {
-            new RegexFilter((java.util.regex.Pattern)null);
+            new RegexFileFilter((java.util.regex.Pattern)null);
             fail();
         } catch (IllegalArgumentException ex) {
             // expected



Mime
View raw message