1
0
mirror of synced 2026-08-05 01:36:56 +00:00

Switching StringBuffer to StringBuilder throughout the codebase (APIs permitting).

This commit is contained in:
Luke Taylor
2009-12-18 18:44:42 +00:00
parent fac07ba8ff
commit aeed49393c
21 changed files with 22 additions and 22 deletions
@@ -305,7 +305,7 @@ public class FilterChainProxy extends GenericFilterBean {
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("FilterChainProxy[");
sb.append(" UrlMatcher = ").append(matcher);
sb.append("; Filter Chains: ");
@@ -56,7 +56,7 @@ public class RequestKey {
}
public String toString() {
StringBuffer sb = new StringBuffer(url.length() + 7);
StringBuilder sb = new StringBuilder(url.length() + 7);
sb.append("[");
if (method != null) {
sb.append(method).append(",");
@@ -132,7 +132,7 @@ public class WebAuthenticationDetails implements SessionIdentifierAware, Seriali
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(super.toString() + ": ");
sb.append("RemoteIpAddress: " + this.getRemoteAddress() + "; ");
sb.append("SessionId: " + this.getSessionId());
@@ -29,7 +29,7 @@ public class PreAuthenticatedGrantedAuthoritiesAuthenticationDetails extends Aut
* @return The String representation of this object.
*/
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(super.toString() + "; ");
sb.append("preAuthenticatedGrantedAuthorities: " + preAuthenticatedGrantedAuthorities);
return sb.toString();
@@ -36,7 +36,7 @@ public class PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails extends
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(super.toString() + "; ");
sb.append(authoritiesContainer);
return sb.toString();
@@ -176,7 +176,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
* @return base64 encoding of the tokens concatenated with the ":" delimiter.
*/
protected String encodeCookie(String[] cookieTokens) {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
for(int i=0; i < cookieTokens.length; i++) {
sb.append(cookieTokens[i]);
@@ -187,7 +187,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
String value = sb.toString();
sb = new StringBuffer(new String(Base64.encode(value.getBytes())));
sb = new StringBuilder(new String(Base64.encode(value.getBytes())));
while (sb.charAt(sb.length() - 1) == '=') {
sb.deleteCharAt(sb.length() - 1);
@@ -109,7 +109,7 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean {
}
}
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("<html><head><title>Login Page</title></head>");
@@ -52,7 +52,7 @@ public class RedirectUrlBuilder {
}
public String getUrl() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
Assert.notNull(scheme);
Assert.notNull(serverName);
@@ -13,7 +13,7 @@ public abstract class TextEscapeUtils {
return s;
}
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
for (int i=0; i < s.length(); i++) {
char c = s.charAt(i);