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;
/**
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') {
*/
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());
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 {
* 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;
}
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)"