ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit XMLJUnitResultFormatter.java
Date Thu, 11 Nov 2004 12:09:01 GMT
stevel      2004/11/11 04:09:01

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/junit
                        XMLJUnitResultFormatter.java
  Log:
  factor out close logic
  
  Revision  Changes    Path
  1.37      +2 -7      ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
  
  Index: XMLJUnitResultFormatter.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- XMLJUnitResultFormatter.java	14 Apr 2004 15:19:13 -0000	1.36
  +++ XMLJUnitResultFormatter.java	11 Nov 2004 12:09:01 -0000	1.37
  @@ -35,6 +35,7 @@
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.util.DOMElementWriter;
   import org.apache.tools.ant.util.DateUtils;
  +import org.apache.tools.ant.util.FileUtils;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Text;
  @@ -158,13 +159,7 @@
                   throw new BuildException("Unable to write log file", exc);
               } finally {
                   if (out != System.out && out != System.err) {
  -                    if (wri != null) {
  -                        try {
  -                            wri.close();
  -                        } catch (IOException e) {
  -                            // ignore
  -                        }
  -                    }
  +                    FileUtils.close(wri);
                   }
               }
           }
  
  
  

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


Mime
View raw message