Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 88918 invoked from network); 7 Jan 2004 10:25:57 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Jan 2004 10:25:57 -0000 Received: (qmail 56764 invoked by uid 500); 7 Jan 2004 10:25:28 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 56731 invoked by uid 500); 7 Jan 2004 10:25:28 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 56718 invoked by uid 500); 7 Jan 2004 10:25:28 -0000 Received: (qmail 56715 invoked from network); 7 Jan 2004 10:25:28 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 7 Jan 2004 10:25:28 -0000 Received: (qmail 88888 invoked by uid 1539); 7 Jan 2004 10:25:54 -0000 Date: 7 Jan 2004 10:25:54 -0000 Message-ID: <20040107102554.88887.qmail@minotaur.apache.org> From: peterreilly@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/etc/testcases/taskdefs copy.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N peterreilly 2004/01/07 02:25:54 Modified: src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH FilterSet.java src/testcases/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH CopyTest.java src/etc/testcases/taskdefs Tag: ANT_16_BRANCH copy.xml Log: Sync with head Revision Changes Path No revision No revision 1.23.2.2 +17 -3 ant/src/main/org/apache/tools/ant/types/FilterSet.java Index: FilterSet.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/FilterSet.java,v retrieving revision 1.23.2.1 retrieving revision 1.23.2.2 diff -u -r1.23.2.1 -r1.23.2.2 --- FilterSet.java 7 Jan 2004 10:11:38 -0000 1.23.2.1 +++ FilterSet.java 7 Jan 2004 10:25:53 -0000 1.23.2.2 @@ -351,14 +351,28 @@ /** * Does replacement on the given string with token matching. - * This uses the defined begintoken and endtoken values which default to @ for both. + * This uses the defined begintoken and endtoken values which default + * to @ for both. + * This resets the passedTokens and calls iReplaceTokens to + * do the actual replacements. * * @param line The line to process the tokens in. * @return The string with the tokens replaced. */ public String replaceTokens(String line) { passedTokens = null; // reset for new line - + return iReplaceTokens(line); + } + + /** + * Does replacement on the given string with token matching. + * This uses the defined begintoken and endtoken values which default + * to @ for both. + * + * @param line The line to process the tokens in. + * @return The string with the tokens replaced. + */ + private String iReplaceTokens(String line) { String beginToken = getBeginToken(); String endToken = getEndToken(); int index = line.indexOf(beginToken); @@ -439,7 +453,7 @@ return parent; } passedTokens.addElement(parent); - String value = this.replaceTokens(line); + String value = iReplaceTokens(line); if (value.indexOf(getBeginToken()) == -1 && !duplicateToken) { duplicateToken = false; passedTokens = null; No revision No revision 1.12.2.2 +5 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/CopyTest.java Index: CopyTest.java =================================================================== RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/CopyTest.java,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -r1.12.2.1 -r1.12.2.2 --- CopyTest.java 7 Jan 2004 10:11:38 -0000 1.12.2.1 +++ CopyTest.java 7 Jan 2004 10:25:53 -0000 1.12.2.2 @@ -130,6 +130,11 @@ executeTarget("filtertest"); assertTrue(getOutput().indexOf("loop in tokens") == -1); } + + public void testInfiniteFilter() { + executeTarget("infinitetest"); + assertTrue(getOutput().indexOf("loop in tokens") != -1); + } public void testFilterSet() throws IOException { executeTarget("testFilterSet"); No revision No revision 1.11.2.2 +14 -0 ant/src/etc/testcases/taskdefs/copy.xml Index: copy.xml =================================================================== RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/copy.xml,v retrieving revision 1.11.2.1 retrieving revision 1.11.2.2 diff -u -r1.11.2.1 -r1.11.2.2 --- copy.xml 7 Jan 2004 10:11:38 -0000 1.11.2.1 +++ copy.xml 7 Jan 2004 10:25:54 -0000 1.11.2.2 @@ -28,6 +28,20 @@ + + + + +a=b= + + + + + + + + + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org