- use StringUtils.LINE_SEP instead of looking up
System.getProperty("line.seperator") each time
- remove unused import statement
Kev
Index:
D:/java_projects/ant-sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
===================================================================
---
D:/java_projects/ant-sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
(revision 331224)
+++
D:/java_projects/ant-sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
(working copy)
@@ -22,8 +22,8 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.NumberFormat;
-import java.util.HashMap;
+import org.apache.tools.ant.util.StringUtils;
import org.apache.tools.ant.BuildException;
/**
@@ -59,10 +59,9 @@
if (out == null) {
return; // Quick return - no output do nothing.
}
- String newLine = System.getProperty("line.separator");
StringBuffer sb = new StringBuffer("Build File: ");
sb.append(buildFile);
- sb.append(newLine);
+ sb.append(StringUtils.LINE_SEP);
try {
out.write(sb.toString().getBytes());
out.flush();
@@ -74,7 +73,6 @@
public void endTestSuite(String buildFile) {
long runTime = System.currentTimeMillis() - start;
- String newLine = System.getProperty("line.separator");
StringBuffer sb = new StringBuffer("Tests run: ");
sb.append(runCount);
sb.append(", Failures: ");
@@ -84,7 +82,7 @@
sb.append(", Time elapsed: ");
sb.append(nf.format(runTime/ 1000.0));
sb.append(" sec");
- sb.append(newLine);
+ sb.append(StringUtils.LINE_SEP);
// // append the err and output streams to the log
// if (systemOutput != null && systemOutput.length() > 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]