Browse Source

factor out close logic

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277010 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 21 years ago
parent
commit
98e632f37a
1 changed files with 2 additions and 7 deletions
  1. +2
    -7
      src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java

+ 2
- 7
src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java View File

@@ -35,6 +35,7 @@ import junit.framework.Test;
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 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
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);
}
}
}


Loading…
Cancel
Save