Browse Source

fix for multiple macro instance use to fail

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276785 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
0cb3ae74e2
2 changed files with 9 additions and 3 deletions
  1. +4
    -1
      WHATSNEW
  2. +5
    -2
      src/main/org/apache/tools/ant/taskdefs/MacroInstance.java

+ 4
- 1
WHATSNEW View File

@@ -65,7 +65,10 @@ Fixed bugs:

* Impossible to use implicit classpath for <taskdef>
when Ant core loader != Java application loader and Path.systemClassPath taken from ${java.class.path}
Bugzilla 30161.
Bugzilla 30161.

* MacroInstance did not clean up nested elements correctly in the execute method, causing
multiple use of the same marco instance with nested elements to fail.

Changes from Ant 1.6.1 to Ant 1.6.2
===================================


+ 5
- 2
src/main/org/apache/tools/ant/taskdefs/MacroInstance.java View File

@@ -48,8 +48,8 @@ public class MacroInstance extends Task implements DynamicAttribute, TaskContain
private MacroDef macroDef;
private Map map = new HashMap();
private Map nsElements = null;
private Map presentElements = new HashMap();
private Hashtable localProperties = new Hashtable();
private Map presentElements;
private Hashtable localProperties;
private String text = null;
private String implicitTag = null;
private List unknownElements = new ArrayList();
@@ -321,6 +321,7 @@ public class MacroInstance extends Task implements DynamicAttribute, TaskContain
*
*/
public void execute() {
presentElements = new HashMap();
getNsElements();
processTasks();
localProperties = new Hashtable();
@@ -379,5 +380,7 @@ public class MacroInstance extends Task implements DynamicAttribute, TaskContain
throw ProjectHelper.addLocationToBuildException(
ex, getLocation());
}
presentElements = null;
localProperties = null;
}
}

Loading…
Cancel
Save