git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@481041 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -28,6 +28,9 @@ Fixed bugs: | |||||
| * dependset failed if the basedir of a target fileset did not exist. | * dependset failed if the basedir of a target fileset did not exist. | ||||
| Bugzilla 40916. | Bugzilla 40916. | ||||
| * Recursive filtering encountered NullPointerExceptions under certain | |||||
| circumstances. Bugzilla 41086. | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| @@ -581,8 +581,8 @@ public class FilterSet extends DataType implements Cloneable { | |||||
| } | } | ||||
| passedTokens.addElement(parent); | passedTokens.addElement(parent); | ||||
| String value = iReplaceTokens(line); | String value = iReplaceTokens(line); | ||||
| if (value.indexOf(beginToken) == -1 && !duplicateToken) { | |||||
| duplicateToken = false; | |||||
| if (value.indexOf(beginToken) == -1 && !duplicateToken | |||||
| && recurseDepth == 1) { | |||||
| passedTokens = null; | passedTokens = null; | ||||
| } else if (duplicateToken) { | } else if (duplicateToken) { | ||||
| // should always be the case... | // should always be the case... | ||||
| @@ -0,0 +1,28 @@ | |||||
| <project xmlns:au="antlib:org.apache.ant.antunit"> | |||||
| <property name="br" value="${line.separator}" /> | |||||
| <target name="testRecursionRegression"> | |||||
| <copy todir="${basedir}"> | |||||
| <string value="@a@${br}@b@${br}@c@${br}" /> | |||||
| <mergemapper to="filterset-output.txt" /> | |||||
| <filterset> | |||||
| <filter token="a" value="aaa" /> | |||||
| <filter token="b" value="bbb" /> | |||||
| <filter token="c" value="@a@:@b@" /> | |||||
| </filterset> | |||||
| </copy> | |||||
| <au:assertTrue> | |||||
| <resourcesmatch astext="true"> | |||||
| <file file="filterset-output.txt" /> | |||||
| <string value="aaa${br}bbb${br}aaa:bbb${br}" /> | |||||
| </resourcesmatch> | |||||
| </au:assertTrue> | |||||
| </target> | |||||
| <target name="tearDown"> | |||||
| <delete file="filterset-output.txt" /> | |||||
| </target> | |||||
| </project> | |||||