Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 82399 invoked from network); 7 Jan 2004 10:10:39 -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:10:39 -0000 Received: (qmail 38991 invoked by uid 500); 7 Jan 2004 10:10:13 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 38951 invoked by uid 500); 7 Jan 2004 10:10:11 -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 38938 invoked by uid 500); 7 Jan 2004 10:10:11 -0000 Received: (qmail 38935 invoked from network); 7 Jan 2004 10:10:11 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 7 Jan 2004 10:10:11 -0000 Received: (qmail 82350 invoked by uid 1539); 7 Jan 2004 10:10:36 -0000 Date: 7 Jan 2004 10:10:36 -0000 Message-ID: <20040107101036.82349.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:10:36 Modified: src/main/org/apache/tools/ant/types FilterSet.java src/testcases/org/apache/tools/ant/taskdefs CopyTest.java src/etc/testcases/taskdefs copy.xml Log: Fix for error in inifinite loop checking in filtersets PR: 23154 Revision Changes Path 1.24 +5 -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 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- FilterSet.java 13 Aug 2003 15:14:31 -0000 1.23 +++ FilterSet.java 7 Jan 2004 10:10:36 -0000 1.24 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -357,6 +357,8 @@ * @return The string with the tokens replaced. */ public String replaceTokens(String line) { + passedTokens = null; // reset for new line + String beginToken = getBeginToken(); String endToken = getEndToken(); int index = line.indexOf(beginToken); @@ -415,7 +417,7 @@ * This parses tokens which point to tokens. * It also maintains a list of currently used tokens, so we cannot * get into an infinite loop - * @param value the value / token to parse + * @param line the value / token to parse * @param parent the parant token (= the token it was parsed from) */ private String replaceTokens(String line, String parent) @@ -426,7 +428,7 @@ if (passedTokens.contains(parent) && !duplicateToken) { duplicateToken = true; StringBuffer sb = new StringBuffer(); - sb.append("Inifinite loop in tokens. Currently known tokens : "); + sb.append("Infinite loop in tokens. Currently known tokens : "); sb.append(passedTokens); sb.append("\nProblem token : " + getBeginToken() + parent + getEndToken()); 1.13 +6 -1 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 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- CopyTest.java 28 Mar 2003 07:33:05 -0000 1.12 +++ CopyTest.java 7 Jan 2004 10:10:36 -0000 1.13 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2003 The Apache Software Foundation. All rights + * Copyright (c) 2000-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -126,6 +126,11 @@ } + public void testFilterTest() { + executeTarget("filtertest"); + assertTrue(getOutput().indexOf("loop in tokens") == -1); + } + public void testFilterSet() throws IOException { executeTarget("testFilterSet"); FileUtils fileUtils = FileUtils.newFileUtils(); 1.12 +22 -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 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- copy.xml 28 Mar 2003 07:35:31 -0000 1.11 +++ copy.xml 7 Jan 2004 10:10:36 -0000 1.12 @@ -10,6 +10,24 @@ + + + + + +PRODUCT_VERSION=6.2.1.4 +PRODUCT_BUILD=6.5 (BLD_65036) +PRODUCT_VERSION=6.2.1.4 +PRODUCT_BUILD=6.5 (BLD_65036) + + + + + + + + + @@ -89,6 +107,8 @@ + + @@ -99,6 +119,8 @@ + + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org