Browse Source

Regression: <path> was evaluating nested content only once, so that it could

not e.g. pick up files that didn't exist the first time through.
Bugzilla 41151.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@485926 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
df0fa4d4ab
3 changed files with 23 additions and 2 deletions
  1. +5
    -2
      WHATSNEW
  2. +1
    -0
      src/main/org/apache/tools/ant/types/Path.java
  3. +17
    -0
      src/tests/antunit/types/resources/latepath-test.xml

+ 5
- 2
WHATSNEW View File

@@ -42,8 +42,11 @@ Fixed bugs:
* XmlProperty overrides previously set property value when handling duplicate * XmlProperty overrides previously set property value when handling duplicate
elements. Bugzilla 41080. elements. Bugzilla 41080.


* Having many tasks causes OOM.
Bugzilla 41049.
* Having many tasks causes OOM. Bugzilla 41049.

* Regression: <path> was evaluating nested content only once, so that it could
not e.g. pick up files that didn't exist the first time through.
Bugzilla 41151.


Other changes: Other changes:
-------------- --------------


+ 1
- 0
src/main/org/apache/tools/ant/types/Path.java View File

@@ -277,6 +277,7 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
if (union == null) { if (union == null) {
union = new Union(); union = new Union();
union.setProject(getProject()); union.setProject(getProject());
union.setCache(false);
} }
union.add(c); union.add(c);
setChecked(false); setChecked(false);


+ 17
- 0
src/tests/antunit/types/resources/latepath-test.xml View File

@@ -0,0 +1,17 @@
<project xmlns:au="antlib:org.apache.ant.antunit">

<target name="testLatePath" depends="tearDown">
<path id="p">
<fileset file="testLatePath" />
</path>
<pathconvert refid="p" />
<touch file="testLatePath" />
<au:assertTrue>
<resourcecount when="eq" count="1" refid="p" />
</au:assertTrue>
</target>

<target name="tearDown">
<delete file="testLatePath" />
</target>
</project>

Loading…
Cancel
Save