Browse Source

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
master
Peter Reilly 22 years ago
parent
commit
c74c1765b1
1 changed files with 1 additions and 30 deletions
  1. +1
    -30
      src/main/org/apache/tools/ant/taskdefs/Ant.java

+ 1
- 30
src/main/org/apache/tools/ant/taskdefs/Ant.java View File

@@ -166,40 +166,11 @@ public class Ant extends Task {
* <p>This can happen if the same instance of this task is run * <p>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 * twice as newProject is set to null at the end of execute (to
* save memory and help the GC).</p> * save memory and help the GC).</p>
* <p>calls init() again</p>
* *
* <p>Sets all properties that have been defined as nested
* property elements.</p>
*/ */
private void reinit() { private void reinit() {
init(); 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);
}
} }


/** /**


Loading…
Cancel
Save