ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs ExecTask.java Execute.java
Date Tue, 28 May 2002 07:06:48 GMT
bodewig     02/05/28 00:06:48

  Modified:    .        Tag: ANT_15_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        ExecTask.java Execute.java
  Log:
  Try to make OS/390 happy.
  
  PR: 9043
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.263.2.22 +4 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.263.2.21
  retrieving revision 1.263.2.22
  diff -u -r1.263.2.21 -r1.263.2.22
  --- WHATSNEW	24 May 2002 13:59:13 -0000	1.263.2.21
  +++ WHATSNEW	28 May 2002 07:06:48 -0000	1.263.2.22
  @@ -10,6 +10,10 @@
   
   * org.apache.tools.ant.taskdefs.Expand no longer extends MatchingTask.
   
  +* Available#setFile now again uses a File argument as it did in 1.4,
  +this may break environments that have been adapted to the String
  +argument version present in 1.5beta1.
  +
   Fixed bugs:
   -----------
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.36.2.1  +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  
  Index: ExecTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
  retrieving revision 1.36
  retrieving revision 1.36.2.1
  diff -u -r1.36 -r1.36.2.1
  --- ExecTask.java	25 Apr 2002 12:14:49 -0000	1.36
  +++ ExecTask.java	28 May 2002 07:06:48 -0000	1.36.2.1
  @@ -342,7 +342,7 @@
           }
           if (baos != null) {
               BufferedReader in =
  -                new BufferedReader(new StringReader(baos.toString()));
  +                new BufferedReader(new StringReader(Execute.toString(baos)));
               String line = null;
               StringBuffer val = new StringBuffer();
               while ((line = in.readLine()) != null) {
  
  
  
  1.43.2.3  +21 -3     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.43.2.2
  retrieving revision 1.43.2.3
  diff -u -r1.43.2.2 -r1.43.2.3
  --- Execute.java	7 May 2002 12:50:57 -0000	1.43.2.2
  +++ Execute.java	28 May 2002 07:06:48 -0000	1.43.2.3
  @@ -78,7 +78,7 @@
    *
    * @since Ant 1.2
    *
  - * @version $Revision: 1.43.2.2 $
  + * @version $Revision: 1.43.2.3 $
    */
   public class Execute {
   
  @@ -182,8 +182,9 @@
                   // Just try to use what we got
               }
   
  -            BufferedReader in =
  -                new BufferedReader(new StringReader(out.toString()));
  +            BufferedReader in = 
  +                new BufferedReader(new StringReader(toString(out)));
  +                
               String var = null;
               String line, lineSep = System.getProperty("line.separator");
               while ((line = in.readLine()) != null) {
  @@ -248,6 +249,23 @@
               String[] cmd = null;
               return cmd;
           }
  +    }
  +
  +    /**
  +     * ByteArrayOutputStream#toString doesn't seem to work reliably on
  +     * OS/390, at least not the way we use it in the execution
  +     * context.
  +     *
  +     * @since Ant 1.5
  +     */
  +    public static String toString(ByteArrayOutputStream bos) {
  +        if (Os.isFamily("z/os")) {
  +            try {
  +                bos.toString("Cp1047");
  +            } catch (java.io.UnsupportedEncodingException e) {
  +            }
  +        }
  +        return bos.toString();
       }
   
       /**
  
  
  

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