Index: org/apache/jasper/compiler/AntCompiler.java =================================================================== --- org/apache/jasper/compiler/AntCompiler.java (revision 831814) +++ org/apache/jasper/compiler/AntCompiler.java (working copy) @@ -124,9 +124,9 @@ String sep = System.getProperty("path.separator"); - StringBuffer errorReport = new StringBuffer(); + StringBuilder errorReport = new StringBuilder(); - StringBuffer info=new StringBuffer(); + StringBuilder info=new StringBuilder(); info.append("Compile: javaFileName=" + javaFileName + "\n" ); info.append(" classpath=" + classpath + "\n" ); @@ -278,7 +278,7 @@ } private String quotePathList(String list) { - StringBuffer result = new StringBuffer(list.length() + 10); + StringBuilder result = new StringBuilder(list.length() + 10); StringTokenizer st = new StringTokenizer(list, File.pathSeparator); while (st.hasMoreTokens()) { String token = st.nextToken(); Index: org/apache/jasper/compiler/DefaultErrorHandler.java =================================================================== --- org/apache/jasper/compiler/DefaultErrorHandler.java (revision 831814) +++ org/apache/jasper/compiler/DefaultErrorHandler.java (working copy) @@ -64,7 +64,7 @@ } Object[] args = null; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (int i=0; i < details.length; i++) { if (details[i].getJspBeginLineNumber() >= 0) { Index: org/apache/jasper/compiler/Dumper.java =================================================================== --- org/apache/jasper/compiler/Dumper.java (revision 831814) +++ org/apache/jasper/compiler/Dumper.java (working copy) @@ -29,7 +29,7 @@ if (attrs == null) return ""; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (int i=0; i < attrs.getLength(); i++) { buf.append(" " + attrs.getQName(i) + "=\"" + attrs.getValue(i) + "\""); Index: org/apache/jasper/compiler/ELParser.java =================================================================== --- org/apache/jasper/compiler/ELParser.java (revision 831814) +++ org/apache/jasper/compiler/ELParser.java (working copy) @@ -86,7 +86,7 @@ */ private ELNode.Nodes parseEL() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); ELexpr = new ELNode.Nodes(); while (hasNext()) { curToken = nextToken(); @@ -176,7 +176,7 @@ */ private String skipUntilEL() { char prev = 0; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); while (hasNextChar()) { char ch = nextChar(); if (prev == '\\') { @@ -227,7 +227,7 @@ if (hasNextChar()) { char ch = nextChar(); if (Character.isJavaIdentifierStart(ch)) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append(ch); while ((ch = peekChar()) != -1 && Character.isJavaIdentifierPart(ch)) { @@ -252,7 +252,7 @@ * '\\', and ('\"', or "\'") */ private Token parseQuotedChars(char quote) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append(quote); while (hasNextChar()) { char ch = nextChar(); Index: org/apache/jasper/compiler/Generator.java =================================================================== --- org/apache/jasper/compiler/Generator.java (revision 831814) +++ org/apache/jasper/compiler/Generator.java (working copy) @@ -126,7 +126,7 @@ if (s == null) return ""; - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c == '"') @@ -148,7 +148,7 @@ */ static String quote(char c) { - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); b.append('\''); if (c == '\'') b.append('\\').append('\''); @@ -166,7 +166,7 @@ private String createJspId() throws JasperException { if (this.jspIdPrefix == null) { - StringBuffer sb = new StringBuffer(32); + StringBuilder sb = new StringBuilder(32); String name = ctxt.getServletJavaFileName(); sb.append("jsp_").append(Math.abs(name.hashCode())).append('_'); this.jspIdPrefix = sb.toString(); @@ -843,7 +843,7 @@ if (tx==null) return null; Class type = expectedType; int size = tx.length(); - StringBuffer output = new StringBuffer(size); + StringBuilder output = new StringBuilder(size); boolean el = false; int i = 0; int mark = 0; @@ -1992,7 +1992,7 @@ n.setBeginJavaLine(out.getJavaLine()); out.printin(); - StringBuffer sb = new StringBuffer("out.write(\""); + StringBuilder sb = new StringBuilder("out.write(\""); int initLength = sb.length(); int count = JspUtil.CHUNKSIZE; int srcLine = 0; // relative to starting srouce line @@ -2815,7 +2815,7 @@ } else if (attr.isELInterpreterInput()) { // results buffer - StringBuffer sb = new StringBuffer(64); + StringBuilder sb = new StringBuilder(64); TagAttributeInfo tai = attr.getTagAttributeInfo(); Index: org/apache/jasper/compiler/JavacErrorDetail.java =================================================================== --- org/apache/jasper/compiler/JavacErrorDetail.java (revision 831814) +++ org/apache/jasper/compiler/JavacErrorDetail.java (working copy) @@ -122,7 +122,7 @@ } // copy out a fragment of JSP to display to the user - StringBuffer fragment = new StringBuffer(1024); + StringBuilder fragment = new StringBuilder(1024); int startIndex = Math.max(0, this.jspBeginLineNum-1-3); int endIndex = Math.min( jspLines.length-1, this.jspBeginLineNum-1+3); Index: org/apache/jasper/compiler/JDTCompiler.java =================================================================== --- org/apache/jasper/compiler/JDTCompiler.java (revision 831814) +++ org/apache/jasper/compiler/JDTCompiler.java (working copy) @@ -106,7 +106,7 @@ new BufferedReader(new InputStreamReader(is, ctxt.getOptions().getJavaEncoding())); if (reader != null) { char[] chars = new char[8192]; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); int count; while ((count = reader.read(chars, 0, chars.length)) > 0) { Index: org/apache/jasper/compiler/JspDocumentParser.java =================================================================== --- org/apache/jasper/compiler/JspDocumentParser.java (revision 831814) +++ org/apache/jasper/compiler/JspDocumentParser.java (working copy) @@ -69,7 +69,7 @@ private JspCompilationContext ctxt; private PageInfo pageInfo; private String path; - private StringBuffer charBuffer; + private StringBuilder charBuffer; // Node representing the XML element currently being parsed private Node current; @@ -458,7 +458,7 @@ public void characters(char[] buf, int offset, int len) { if (charBuffer == null) { - charBuffer = new StringBuffer(); + charBuffer = new StringBuilder(); } charBuffer.append(buf, offset, len); } Index: org/apache/jasper/compiler/JspReader.java =================================================================== --- org/apache/jasper/compiler/JspReader.java (revision 831814) +++ org/apache/jasper/compiler/JspReader.java (working copy) @@ -420,7 +420,7 @@ * @param quoted If true accept quoted strings. */ String parseToken(boolean quoted) throws JasperException { - StringBuffer stringBuffer = new StringBuffer(); + StringBuilder stringBuffer = new StringBuilder(); skipSpaces(); stringBuffer.setLength(0); Index: org/apache/jasper/compiler/JspRuntimeContext.java =================================================================== --- org/apache/jasper/compiler/JspRuntimeContext.java (revision 831814) +++ org/apache/jasper/compiler/JspRuntimeContext.java (working copy) @@ -326,7 +326,7 @@ private void initClassPath() { URL [] urls = parentClassLoader.getURLs(); - StringBuffer cpath = new StringBuffer(); + StringBuilder cpath = new StringBuilder(); String sep = System.getProperty("path.separator"); for(int i = 0; i < urls.length; i++) { Index: org/apache/jasper/compiler/Node.java =================================================================== --- org/apache/jasper/compiler/Node.java (revision 831814) +++ org/apache/jasper/compiler/Node.java (working copy) @@ -851,7 +851,7 @@ String ret = text; if (ret == null) { if (body != null) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (int i = 0; i < body.size(); i++) { buf.append(body.getNode(i).getText()); } Index: org/apache/jasper/compiler/Parser.java =================================================================== --- org/apache/jasper/compiler/Parser.java (revision 831814) +++ org/apache/jasper/compiler/Parser.java (working copy) @@ -218,7 +218,7 @@ private String parseName() throws JasperException { char ch = (char) reader.peekChar(); if (Character.isLetter(ch) || ch == '_' || ch == ':') { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append(ch); reader.nextChar(); ch = (char) reader.peekChar(); @@ -261,7 +261,7 @@ */ private String parseQuoted(Mark start, String tx, char quote) throws JasperException { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); int size = tx.length(); int i = 0; while (i < size) { Index: org/apache/jasper/compiler/SmapGenerator.java =================================================================== --- org/apache/jasper/compiler/SmapGenerator.java (revision 831814) +++ org/apache/jasper/compiler/SmapGenerator.java (working copy) @@ -111,7 +111,7 @@ // check state and initialize buffer if (outputFileName == null) throw new IllegalStateException(); - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); // start the SMAP out.append("SMAP\n"); Index: org/apache/jasper/compiler/SmapStratum.java =================================================================== --- org/apache/jasper/compiler/SmapStratum.java (revision 831814) +++ org/apache/jasper/compiler/SmapStratum.java (working copy) @@ -93,7 +93,7 @@ public String getString() { if (inputStartLine == -1 || outputStartLine == -1) throw new IllegalStateException(); - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); out.append(inputStartLine); if (lineFileIDSet) out.append("#" + lineFileID); @@ -295,7 +295,7 @@ if (fileNameList.size() == 0 || lineData.size() == 0) return null; - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); // print StratumSection out.append("*S " + stratumName + "\n"); Index: org/apache/jasper/compiler/TextOptimizer.java =================================================================== --- org/apache/jasper/compiler/TextOptimizer.java (revision 831814) +++ org/apache/jasper/compiler/TextOptimizer.java (working copy) @@ -32,7 +32,7 @@ private PageInfo pageInfo; private int textNodeCount = 0; private Node.TemplateText firstTextNode = null; - private StringBuffer textBuffer; + private StringBuilder textBuffer; private final String emptyText = new String(""); public TextCatVisitor(Compiler compiler) { @@ -80,7 +80,7 @@ if (textNodeCount++ == 0) { firstTextNode = n; - textBuffer = new StringBuffer(n.getText()); + textBuffer = new StringBuilder(n.getText()); } else { // Append text to text buffer textBuffer.append(n.getText()); Index: org/apache/jasper/compiler/Validator.java =================================================================== --- org/apache/jasper/compiler/Validator.java (revision 831814) +++ org/apache/jasper/compiler/Validator.java (working copy) @@ -420,7 +420,7 @@ private ClassLoader loader; - private final StringBuffer buf = new StringBuffer(32); + private final StringBuilder buf = new StringBuilder(32); private static final JspUtil.ValidAttribute[] jspRootAttrs = { new JspUtil.ValidAttribute("xsi:schemaLocation"), @@ -717,7 +717,7 @@ } // build expression - StringBuffer expr = this.getBuffer(); + StringBuilder expr = this.getBuffer(); expr.append(n.getType()).append('{').append(n.getText()) .append('}'); ELNode.Nodes el = ELParser.parse(expr.toString()); @@ -1358,9 +1358,9 @@ } /* - * Return an empty StringBuffer [not thread-safe] + * Return an empty StringBuilder [not thread-safe] */ - private StringBuffer getBuffer() { + private StringBuilder getBuffer() { this.buf.setLength(0); return this.buf; } @@ -1669,7 +1669,7 @@ ValidationMessage[] errors = tagInfo.validate(n.getTagData()); if (errors != null && errors.length != 0) { - StringBuffer errMsg = new StringBuffer(); + StringBuilder errMsg = new StringBuilder(); errMsg.append("

"); errMsg.append(Localizer.getMessage( "jsp.error.tei.invalid.attributes", n.getQName())); @@ -1759,7 +1759,7 @@ private static void validateXmlView(PageData xmlView, Compiler compiler) throws JasperException { - StringBuffer errMsg = null; + StringBuilder errMsg = null; ErrorDispatcher errDisp = compiler.getErrorDispatcher(); for (Iterator iter = compiler.getPageInfo().getTaglibs().iterator(); iter @@ -1773,7 +1773,7 @@ ValidationMessage[] errors = tli.validate(xmlView); if ((errors != null) && (errors.length != 0)) { if (errMsg == null) { - errMsg = new StringBuffer(); + errMsg = new StringBuilder(); } errMsg.append("

"); errMsg.append(Localizer.getMessage(