stevel 2004/11/11 04:14:48 Modified: src/main/org/apache/tools/ant/taskdefs/optional/junit XMLResultAggregator.java Log: factor out close logic. This changes semantics slightly was we no longer raise an IOE if file closure fails. Revision Changes Path 1.30 +3 -7 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java Index: XMLResultAggregator.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- XMLResultAggregator.java 9 Mar 2004 16:48:31 -0000 1.29 +++ XMLResultAggregator.java 11 Nov 2004 12:14:48 -0000 1.30 @@ -34,6 +34,7 @@ import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.util.DOMElementWriter; import org.apache.tools.ant.util.StringUtils; +import org.apache.tools.ant.util.FileUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -200,13 +201,8 @@ throw new IOException("Error while writing DOM content"); } } finally { - if (wri != null) { - wri.close(); - out = null; - } - if (out != null) { - out.close(); - } + FileUtils.close(wri); + FileUtils.close(out); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]