Return-Path: Delivered-To: apmail-commons-commits-archive@locus.apache.org Received: (qmail 58917 invoked from network); 15 Oct 2007 17:03:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Oct 2007 17:03:03 -0000 Received: (qmail 35443 invoked by uid 500); 15 Oct 2007 17:02:49 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 35371 invoked by uid 500); 15 Oct 2007 17:02:49 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 35362 invoked by uid 99); 15 Oct 2007 17:02:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2007 10:02:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2007 17:03:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 77C2D1A9832; Mon, 15 Oct 2007 10:02:40 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584823 - in /commons/proper/io/trunk: build-check-jdk13.xml src/java/org/apache/commons/io/filefilter/FileFilterUtils.java src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java Date: Mon, 15 Oct 2007 17:02:38 -0000 To: commits@commons.apache.org From: niallp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071015170240.77C2D1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: niallp Date: Mon Oct 15 10:02:38 2007 New Revision: 584823 URL: http://svn.apache.org/viewvc?rev=584823&view=rev Log: IO-127 - add ant build script to check JDK 1.3 compatibility and remove references to JDK 1.4 dependant class from FileFilterUtils Added: commons/proper/io/trunk/build-check-jdk13.xml (with props) Modified: 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 Added: commons/proper/io/trunk/build-check-jdk13.xml URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/build-check-jdk13.xml?rev=584823&view=auto ============================================================================== --- commons/proper/io/trunk/build-check-jdk13.xml (added) +++ commons/proper/io/trunk/build-check-jdk13.xml Mon Oct 15 10:02:38 2007 @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: commons/proper/io/trunk/build-check-jdk13.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/io/trunk/build-check-jdk13.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL 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=584823&r1=584822&r2=584823&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 Mon Oct 15 10:02:38 2007 @@ -281,43 +281,6 @@ return new AndFileFilter(minimumFilter, maximumFilter); } - /** - * Returns a filter that uses a regular expression to filter file names. - * - * @param pattern the regular expression pattern - * @return an appropriately configured IOFileFilter - * @since Commons IO 1.4 - */ - public static IOFileFilter regex(String pattern) { - return new RegexFileFilter(pattern); - } - - /** - * Returns a filter that uses a regular expression to filter file names with - * the specified case sensitivity. - * - * @param pattern the regular expression pattern - * @param caseSensitivity how to handle case sensitivity, null means case-sensitive - * @return an appropriately configured IOFileFilter - * @since Commons IO 1.4 - */ - public static IOFileFilter regex(String pattern, IOCase caseSensitivity) { - return new RegexFileFilter(pattern, caseSensitivity); - } - - /** - * Returns a filter that uses a regular expression to filter file names with - * the specified flags. - * - * @param pattern the regular expression pattern - * @param flags pattern flags (e.g. {@link java.util.regex.Pattern#CASE_INSENSITIVE}) - * @return an appropriately configured IOFileFilter - * @since Commons IO 1.4 - */ - public static IOFileFilter regex(String pattern, int flags) { - return new RegexFileFilter(pattern, flags); - } - //----------------------------------------------------------------------- /* Constructed on demand and then cached */ private static IOFileFilter cvsFilter; 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=584823&r1=584822&r2=584823&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 Mon Oct 15 10:02:38 2007 @@ -823,12 +823,12 @@ } public void testRegex() throws Exception { - IOFileFilter filter = FileFilterUtils.regex("^.*[tT]est(-\\d+)?\\.java$"); + IOFileFilter filter = new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$"); assertFiltering(filter, new File("Test.java"), true); assertFiltering(filter, new File("test-10.java"), true); assertFiltering(filter, new File("test-.java"), false); - filter = FileFilterUtils.regex("^[Tt]est.java$"); + filter = new RegexFileFilter("^[Tt]est.java$"); assertFiltering(filter, new File("Test.java"), true); assertFiltering(filter, new File("test.java"), true); assertFiltering(filter, new File("tEST.java"), false); @@ -838,32 +838,32 @@ assertFiltering(filter, new File("test.java"), true); assertFiltering(filter, new File("tEST.java"), true); - filter = FileFilterUtils.regex("^test.java$", Pattern.CASE_INSENSITIVE); + filter = new RegexFileFilter("^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); - filter = FileFilterUtils.regex("^test.java$", IOCase.INSENSITIVE); + filter = new RegexFileFilter("^test.java$", IOCase.INSENSITIVE); assertFiltering(filter, new File("Test.java"), true); assertFiltering(filter, new File("test.java"), true); assertFiltering(filter, new File("tEST.java"), true); try { - FileFilterUtils.regex((String)null); + new RegexFileFilter((String)null); fail(); } catch (IllegalArgumentException ex) { // expected } try { - FileFilterUtils.regex((String)null, Pattern.CASE_INSENSITIVE); + new RegexFileFilter((String)null, Pattern.CASE_INSENSITIVE); fail(); } catch (IllegalArgumentException ex) { // expected } try { - FileFilterUtils.regex((String)null, IOCase.INSENSITIVE); + new RegexFileFilter((String)null, IOCase.INSENSITIVE); fail(); } catch (IllegalArgumentException ex) { // expected