ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs LoadFile.java
Date Sat, 02 Feb 2002 12:52:01 GMT
conor       02/02/02 04:52:01

  Modified:    src/main/org/apache/tools/ant Project.java
                        ProjectHelper.java
               src/main/org/apache/tools/ant/taskdefs LoadFile.java
  Log:
  Since Project.getProperties now returns a cloned hashtable, should
  avoid using it for property replacement.
  
  Project.replaceProperties now passes its properties map to ProjectHelper's
  main replaceProperties method rather than calling the simple version which
  just called back to project.getProperties().
  
  The simple version in ProjectHelper now calls Project.replaceProperties
  rather than calling Project.getProperties.
  
  Revision  Changes    Path
  1.93      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -w -u -r1.92 -r1.93
  --- Project.java	10 Jan 2002 11:21:19 -0000	1.92
  +++ Project.java	2 Feb 2002 12:52:00 -0000	1.93
  @@ -381,7 +381,7 @@
        */
       public String replaceProperties(String value)
           throws BuildException { 
  -        return ProjectHelper.replaceProperties(this, value);
  +        return ProjectHelper.replaceProperties(this, value, properties);
       }
   
       /**
  
  
  
  1.73      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -w -u -r1.72 -r1.73
  --- ProjectHelper.java	10 Jan 2002 11:21:19 -0000	1.72
  +++ ProjectHelper.java	2 Feb 2002 12:52:00 -0000	1.73
  @@ -737,7 +737,7 @@
        */
        public static String replaceProperties(Project project, String value)
               throws BuildException {
  -         return replaceProperties(project,value,project.getProperties());
  +         return project.replaceProperties(value);
        }
   
       /**
  
  
  
  1.7       +1 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java
  
  Index: LoadFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  --- LoadFile.java	1 Feb 2002 07:22:56 -0000	1.6
  +++ LoadFile.java	2 Feb 2002 12:52:01 -0000	1.7
  @@ -56,7 +56,6 @@
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.ProjectHelper;
   
   
   import java.io.*;
  @@ -205,7 +204,7 @@
                   text=stripLineBreaks(text);
               }
               if(evaluateProperties) {
  -                text=ProjectHelper.replaceProperties(project,text);
  +                text = project.replaceProperties(text);
               }
               project.setNewProperty(property, text);
               log("loaded "+buffer.length+" characters",Project.MSG_VERBOSE);
  
  
  

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


Mime
View raw message