ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional ReplaceRegExp.java
Date Thu, 09 Oct 2003 08:30:39 GMT
bodewig     2003/10/09 01:30:39

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional Tag:
                        ANT_16_BRANCH ReplaceRegExp.java
  Log:
  Merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.27.2.1  +7 -2      ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
  
  Index: ReplaceRegExp.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java,v
  retrieving revision 1.27
  retrieving revision 1.27.2.1
  diff -u -r1.27 -r1.27.2.1
  --- ReplaceRegExp.java	17 Sep 2003 20:11:43 -0000	1.27
  +++ ReplaceRegExp.java	9 Oct 2003 08:30:39 -0000	1.27.2.1
  @@ -58,11 +58,14 @@
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileReader;
  +import java.io.FileOutputStream;
   import java.io.FileWriter;
   import java.io.InputStreamReader;
   import java.io.IOException;
  +import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
   import java.io.Reader;
  +import java.io.Writer;
   import java.util.Vector;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.DirectoryScanner;
  @@ -320,15 +323,17 @@
           File temp = fileUtils.createTempFile("replace", ".txt", null);
   
           Reader r = null;
  -        FileWriter w = null;
  +        Writer w = null;
   
           try {
               if (encoding == null) {
                   r = new FileReader(f);
  +                w = new FileWriter(temp);
               } else {
                   r = new InputStreamReader(new FileInputStream(f), encoding);
  +                w = new OutputStreamWriter(new FileOutputStream(temp),
  +                                           encoding);
               }
  -            w = new FileWriter(temp);
   
               BufferedReader br = new BufferedReader(r);
               BufferedWriter bw = new BufferedWriter(w);
  
  
  

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


Mime
View raw message