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/optional/junit XMLJUnitResultFormatter.java XMLResultAggregator.java
Date Thu, 12 Jul 2001 13:51:14 GMT
bodewig     01/07/12 06:51:13

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/junit
                        XMLJUnitResultFormatter.java
                        XMLResultAggregator.java
  Log:
  Make sure XML report will be UTF8 encoded.
  
  Submitted by:	Stephane Bailliez <sbailliez@imediation.com>
  
  Revision  Changes    Path
  1.9       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
  
  Index: XMLJUnitResultFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XMLJUnitResultFormatter.java	2001/07/11 09:29:52	1.8
  +++ XMLJUnitResultFormatter.java	2001/07/12 13:51:07	1.9
  @@ -162,7 +162,7 @@
           if (out != null) {
               Writer wri = null;
               try {
  -                wri = new OutputStreamWriter(out);
  +                wri = new OutputStreamWriter(out, "UTF8");
                   wri.write("<?xml version=\"1.0\"?>\n");
                   (new DOMElementWriter()).write(rootElement, wri, 0, "  ");
                   wri.flush();
  
  
  
  1.4       +2 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
  
  Index: XMLResultAggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLResultAggregator.java	2001/06/21 15:21:00	1.3
  +++ XMLResultAggregator.java	2001/07/12 13:51:09	1.4
  @@ -56,6 +56,7 @@
   import java.io.File;
   import java.io.IOException;
   import java.io.OutputStream;
  +import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
   import java.io.StringWriter;
   import java.io.FileOutputStream;
  @@ -221,7 +222,7 @@
        */
       protected void writeDOMTree(Document doc, File file) throws IOException {
           OutputStream out = new FileOutputStream( file );
  -        PrintWriter wri = new PrintWriter(out);
  +        PrintWriter wri = new PrintWriter(new OutputStreamWriter(out, "UTF8"));
           wri.write("<?xml version=\"1.0\"?>\n");
           (new DOMElementWriter()).write(doc.getDocumentElement(), wri, 0, "  ");
           wri.flush();
  
  
  

Mime
View raw message