mirror of https://github.com/apache/poi.git
replace some more StringBuffers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1870096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd3f373c44
commit
f82a1ffe6a
|
@ -48,10 +48,10 @@ public abstract class BuildFileTest extends TestCase {
|
|||
|
||||
protected Project project;
|
||||
|
||||
private StringBuffer logBuffer;
|
||||
private StringBuffer fullLogBuffer;
|
||||
private StringBuffer outBuffer;
|
||||
private StringBuffer errBuffer;
|
||||
private StringBuilder logBuffer;
|
||||
private StringBuilder fullLogBuffer;
|
||||
private StringBuilder outBuffer;
|
||||
private StringBuilder errBuffer;
|
||||
private BuildException buildException;
|
||||
|
||||
/**
|
||||
|
@ -265,8 +265,8 @@ public abstract class BuildFileTest extends TestCase {
|
|||
return buildException;
|
||||
}
|
||||
|
||||
private String cleanBuffer(StringBuffer buffer) {
|
||||
StringBuffer cleanedBuffer = new StringBuffer();
|
||||
private String cleanBuffer(StringBuilder buffer) {
|
||||
StringBuilder cleanedBuffer = new StringBuilder();
|
||||
for (int i = 0; i < buffer.length(); i++) {
|
||||
char ch = buffer.charAt(i);
|
||||
if (ch != '\r') {
|
||||
|
@ -292,8 +292,8 @@ public abstract class BuildFileTest extends TestCase {
|
|||
*/
|
||||
public void configureProject(String filename, int logLevel)
|
||||
throws BuildException {
|
||||
logBuffer = new StringBuffer();
|
||||
fullLogBuffer = new StringBuffer();
|
||||
logBuffer = new StringBuilder();
|
||||
fullLogBuffer = new StringBuilder();
|
||||
project = new Project();
|
||||
project.init();
|
||||
project.setNewProperty("data.dir.name", getDataDir());
|
||||
|
@ -315,14 +315,14 @@ public abstract class BuildFileTest extends TestCase {
|
|||
try {
|
||||
sysOut.flush();
|
||||
sysErr.flush();
|
||||
outBuffer = new StringBuffer();
|
||||
outBuffer = new StringBuilder();
|
||||
PrintStream out = new PrintStream(new AntOutputStream(outBuffer));
|
||||
System.setOut(out);
|
||||
errBuffer = new StringBuffer();
|
||||
errBuffer = new StringBuilder();
|
||||
PrintStream err = new PrintStream(new AntOutputStream(errBuffer));
|
||||
System.setErr(err);
|
||||
logBuffer = new StringBuffer();
|
||||
fullLogBuffer = new StringBuffer();
|
||||
logBuffer = new StringBuilder();
|
||||
fullLogBuffer = new StringBuilder();
|
||||
buildException = null;
|
||||
project.executeTarget(targetName);
|
||||
} finally {
|
||||
|
@ -483,9 +483,9 @@ public abstract class BuildFileTest extends TestCase {
|
|||
* an output stream which saves stuff to our buffer.
|
||||
*/
|
||||
protected static class AntOutputStream extends java.io.OutputStream {
|
||||
private StringBuffer buffer;
|
||||
private StringBuilder buffer;
|
||||
|
||||
public AntOutputStream(StringBuffer buffer) {
|
||||
public AntOutputStream(StringBuilder buffer) {
|
||||
this.buffer = buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public final class TestNpv extends TestCase {
|
|||
HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("IrrNpvTestCaseData.xls");
|
||||
HSSFSheet sheet = wb.getSheet("IRR-NPV");
|
||||
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
|
||||
StringBuffer failures = new StringBuffer();
|
||||
StringBuilder failures = new StringBuilder();
|
||||
int failureCount = 0;
|
||||
// TODO YK: Formulas in rows 16 and 17 operate with ArrayPtg which isn't yet supported
|
||||
// FormulaEvaluator as of r1041407 throws "Unexpected ptg class (org.apache.poi.ss.formula.ptg.ArrayPtg)"
|
||||
|
|
Loading…
Reference in New Issue