From c74c1765b16020d1d0eb6af541c53c9a9d4ba1fc Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Tue, 5 Aug 2003 11:47:33 +0000 Subject: [PATCH] Remove unneeded setting of properties in reinit() git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275017 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/Ant.java | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Ant.java b/src/main/org/apache/tools/ant/taskdefs/Ant.java index 9a226e317..b9f0f0074 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Ant.java +++ b/src/main/org/apache/tools/ant/taskdefs/Ant.java @@ -166,40 +166,11 @@ public class Ant extends Task { *

This can happen if the same instance of this task is run * twice as newProject is set to null at the end of execute (to * save memory and help the GC).

+ *

calls init() again

* - *

Sets all properties that have been defined as nested - * property elements.

*/ private void reinit() { init(); - final int count = properties.size(); - for (int i = 0; i < count; i++) { - Property p = (Property) properties.elementAt(i); - Property newP = (Property) newProject.createTask("property"); - newP.setName(p.getName()); - if (p.getValue() != null) { - newP.setValue(p.getValue()); - } - if (p.getFile() != null) { - newP.setFile(p.getFile()); - } - if (p.getResource() != null) { - newP.setResource(p.getResource()); - } - if (p.getPrefix() != null) { - newP.setPrefix(p.getPrefix()); - } - if (p.getRefid() != null) { - newP.setRefid(p.getRefid()); - } - if (p.getEnvironment() != null) { - newP.setEnvironment(p.getEnvironment()); - } - if (p.getClasspath() != null) { - newP.setClasspath(p.getClasspath()); - } - properties.setElementAt(newP, i); - } } /**