bodewig 2002/09/13 01:54:27
Modified: src/main/org/apache/tools/ant/taskdefs Ant.java
Property.java
Log:
Release references to the child project when <ant*> has been done.
PR: 12499
Submitted by: <gregm at bea.com>
Revision Changes Path
1.66 +6 -0
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
Index: Ant.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- Ant.java 25 Jul 2002 15:21:04 -0000 1.65
+++ Ant.java 13 Sep 2002 08:54:26 -0000 1.66
@@ -377,6 +377,12 @@
} 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();
1.56 +4 -0
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java
Index: Property.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- Property.java 31 Jul 2002 07:04:48 -0000 1.55
+++ Property.java 13 Sep 2002 08:54:26 -0000 1.56
@@ -320,6 +320,10 @@
* 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 "
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>