Browse Source

Release references to the child project when <ant*> has been done.

PR: 12499
Submitted by:	<gregm at bea.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273321 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
38495bec11
2 changed files with 10 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/taskdefs/Ant.java
  2. +4
    -0
      src/main/org/apache/tools/ant/taskdefs/Property.java

+ 6
- 0
src/main/org/apache/tools/ant/taskdefs/Ant.java View File

@@ -377,6 +377,12 @@ public class Ant extends Task {
} finally {
// help the gc
newProject = null;
Enumeration enum = properties.elements();
while (enum.hasMoreElements()) {
Property p = (Property) enum.nextElement();
p.setProject(null);
}

if (output != null && out != null) {
try {
out.close();


+ 4
- 0
src/main/org/apache/tools/ant/taskdefs/Property.java View File

@@ -320,6 +320,10 @@ public class Property extends Task {
* here is where it is loaded
*/
public void execute() throws BuildException {
if (getProject() == null) {
throw new IllegalStateException("project has not been set");
}

if (name != null) {
if (value == null && ref == null) {
throw new BuildException("You must specify value, location or "


Loading…
Cancel
Save