You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2003/08/05 13:47:33 UTC

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Ant.java

peterreilly    2003/08/05 04:47:33

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Remove unneeded setting of properties in reinit()
  
  Revision  Changes    Path
  1.84      +1 -30     ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- Ant.java	24 Jul 2003 14:07:51 -0000	1.83
  +++ Ant.java	5 Aug 2003 11:47:33 -0000	1.84
  @@ -166,40 +166,11 @@
        * <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
        * 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() {
           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);
  -        }
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org