Index: org/apache/jasper/compiler/JspUtil.java =================================================================== --- org/apache/jasper/compiler/JspUtil.java (revision 831814) +++ org/apache/jasper/compiler/JspUtil.java (working copy) @@ -104,7 +104,7 @@ int n = s.indexOf("%\\>"); if (n < 0) break; - StringBuffer sb = new StringBuffer(s.substring(0, n)); + StringBuilder sb = new StringBuilder(s.substring(0, n)); sb.append("%>"); sb.append(s.substring(n + 3)); s = sb.toString(); @@ -337,7 +337,7 @@ */ public static String escapeXml(String s) { if (s == null) return null; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for(int i=0; iwith. */ public static String replace(String name, char replace, String with) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); int begin = 0; int end; int last = name.length(); @@ -557,22 +557,22 @@ // the generated Servlet/SimpleTag implements FunctionMapper, so // that machinery is already in place (mroth). targetType = toJavaSourceType(targetType); - StringBuffer call = new StringBuffer( - "(" + targetType + ") " - + "org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate" - + "(" + Generator.quote(expression) + ", " - + targetType + ".class, " - + "(PageContext)" + jspCtxt - + ", " + fnmapvar - + ", " + XmlEscape - + ")"); + StringBuilder call = new StringBuilder(); + call.append("(").append(targetType).append(") " + + "org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate" + + "(").append(Generator.quote(expression)).append(", ") + .append(targetType).append(".class, " + + "(PageContext)").append(jspCtxt).append(", ") + .append(fnmapvar).append(", ") + .append(XmlEscape) + .append(")"); /* * Add the primitive converter method if we need to. */ if (primitiveConverterMethod != null) { call.insert(0, "("); - call.append(")." + primitiveConverterMethod + "()"); + call.append(").").append(primitiveConverterMethod).append("()"); } return call.toString(); @@ -926,7 +926,7 @@ } private static String getClassNameBase(String urn) { - StringBuffer base = new StringBuffer("org.apache.jsp.tag.meta."); + StringBuilder base = new StringBuilder("org.apache.jsp.tag.meta."); if (urn != null) { base.append(makeJavaPackage(urn)); base.append('.'); @@ -943,7 +943,7 @@ */ public static final String makeJavaPackage(String path) { String classNameComponents[] = split(path,"/"); - StringBuffer legalClassNames = new StringBuffer(); + StringBuilder legalClassNames = new StringBuilder(); for (int i = 0; i < classNameComponents.length; i++) { legalClassNames.append(makeJavaIdentifier(classNameComponents[i])); if (i < classNameComponents.length - 1) { @@ -989,8 +989,8 @@ * @return Legal Java identifier corresponding to the given identifier */ public static final String makeJavaIdentifier(String identifier) { - StringBuffer modifiedIdentifier = - new StringBuffer(identifier.length()); + StringBuilder modifiedIdentifier = + new StringBuilder(identifier.length()); if (!Character.isJavaIdentifierStart(identifier.charAt(0))) { modifiedIdentifier.append('_'); } @@ -1142,7 +1142,7 @@ break; } } - StringBuffer resultType = new StringBuffer(t); + StringBuilder resultType = new StringBuilder(t); for (; dims > 0; dims--) { resultType.append("[]"); } @@ -1165,7 +1165,7 @@ return binaryName; } - StringBuffer buf = new StringBuffer(binaryName); + StringBuilder buf = new StringBuilder(binaryName); do { buf.setCharAt(c.getName().length(), '.'); c = c.getDeclaringClass();