ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n Translate.java
Date Mon, 06 May 2002 12:06:10 GMT
umagesh     02/05/06 05:06:10

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/i18n Tag:
                        ANT_15_BRANCH Translate.java
  Log:
  Use resolvefile on the proper source file.
  
  Submitted by: GOMEZ Henri <hgomez@slib.fr>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.1  +7 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
  
  Index: Translate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- Translate.java	14 Apr 2002 11:16:18 -0000	1.11
  +++ Translate.java	6 May 2002 12:06:10 -0000	1.11.2.1
  @@ -74,7 +74,7 @@
   /**
    * Translates text embedded in files using Resource Bundle files.
    *
  - * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
  + * @author Magesh Umasankar
    */
   public class Translate extends MatchingTask {
   
  @@ -228,8 +228,8 @@
       }
   
       /**
  -     * Whether or not to overwrite existing file irrespective of 
  -     * whether it is newer than the source file as well as the 
  +     * Whether or not to overwrite existing file irrespective of
  +     * whether it is newer than the source file as well as the
        * resource bundle file.
        * Defaults to false.
        */
  @@ -503,7 +503,8 @@
                               Project.MSG_DEBUG);
                       }
                       destLastModified = dest.lastModified();
  -                    srcLastModified = new File(srcFiles[i]).lastModified();
  +                    File src = fileUtils.resolveFile(ds.getBasedir(), srcFiles[j]);
  +                    srcLastModified = src.lastModified();
                       //Check to see if dest file has to be recreated
                       if (forceOverwrite
                           || destLastModified < srcLastModified
  @@ -517,10 +518,10 @@
                           log("Processing " + srcFiles[j],
                               Project.MSG_DEBUG);
                           FileOutputStream fos = new FileOutputStream(dest);
  -                        BufferedWriter out 
  +                        BufferedWriter out
                               = new BufferedWriter(new OutputStreamWriter(fos, destEncoding));
                           FileInputStream fis = new FileInputStream(srcFiles[j]);
  -                        BufferedReader in 
  +                        BufferedReader in
                               = new BufferedReader(new InputStreamReader(fis, srcEncoding));
                           String line;
                           while ((line = in.readLine()) != null) {
  
  
  

--
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