ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Wed, 25 May 2005 22:25:43 GMT
mbenson     2005/05/25 15:25:43

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Avoid multiple instantiations of equal File objects, and multiple
  resolveFile calls.
  
  Revision  Changes    Path
  1.121     +2 -3      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.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- Ant.java	22 May 2005 19:48:25 -0000	1.120
  +++ Ant.java	25 May 2005 22:25:43 -0000	1.121
  @@ -326,8 +326,7 @@
               // Are we trying to call the target in which we are defined (or
               // the build file if this is a top level task)?
               if (thisAntFile != null
  -                && newProject.resolveFile(newProject.getProperty("ant.file"))
  -                .equals(getProject().resolveFile(thisAntFile))
  +                && file.equals(getProject().resolveFile(thisAntFile))
                   && getOwningTarget() != null) {
   
                   if (getOwningTarget().getName().equals("")) {
  @@ -342,7 +341,7 @@
               }
   
               try {
  -                ProjectHelper.configureProject(newProject, new File(antFile));
  +                ProjectHelper.configureProject(newProject, file);
               } catch (BuildException ex) {
                   throw ProjectHelper.addLocationToBuildException(
                       ex, getLocation());
  
  
  

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


Mime
View raw message