Fix remaining StringBuffer => StringBuilder
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@823859 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
142997acd6
commit
7c2cc42b1f
|
@ -251,7 +251,7 @@ public class AuthScope {
|
|||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
if (this.scheme != null) {
|
||||
buffer.append(this.scheme.toUpperCase(Locale.ENGLISH));
|
||||
buffer.append(' ');
|
||||
|
|
|
@ -71,7 +71,7 @@ public class Rfc3492Idn implements Idn {
|
|||
}
|
||||
|
||||
public String toUnicode(String punycode) {
|
||||
StringBuffer unicode = new StringBuffer(punycode.length());
|
||||
StringBuilder unicode = new StringBuilder(punycode.length());
|
||||
StringTokenizer tok = new StringTokenizer(punycode, ".");
|
||||
while (tok.hasMoreTokens()) {
|
||||
String t = tok.nextToken();
|
||||
|
@ -86,7 +86,7 @@ public class Rfc3492Idn implements Idn {
|
|||
int n = initial_n;
|
||||
int i = 0;
|
||||
int bias = initial_bias;
|
||||
StringBuffer output = new StringBuffer(input.length());
|
||||
StringBuilder output = new StringBuilder(input.length());
|
||||
int lastdelim = input.lastIndexOf(delimiter);
|
||||
if (lastdelim != -1) {
|
||||
output.append(input.subSequence(0, lastdelim));
|
||||
|
|
|
@ -244,7 +244,7 @@ public class URIUtils {
|
|||
outputSegments.push(inputSegments[i]);
|
||||
}
|
||||
}
|
||||
StringBuffer outputBuffer = new StringBuffer();
|
||||
StringBuilder outputBuffer = new StringBuilder();
|
||||
for (String outputSegment : outputSegments) {
|
||||
outputBuffer.append('/').append(outputSegment);
|
||||
}
|
||||
|
|
|
@ -175,8 +175,8 @@ public abstract class AbstractVerifier implements X509HostnameVerifier {
|
|||
throw new SSLException(msg);
|
||||
}
|
||||
|
||||
// StringBuffer for building the error message.
|
||||
StringBuffer buf = new StringBuffer();
|
||||
// StringBuilder for building the error message.
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
// We're can be case-insensitive when comparing the host we used to
|
||||
// establish the socket to the hostname in the certificate.
|
||||
|
@ -186,7 +186,7 @@ public abstract class AbstractVerifier implements X509HostnameVerifier {
|
|||
// Don't trim the CN, though!
|
||||
String cn = it.next();
|
||||
cn = cn.toLowerCase(Locale.ENGLISH);
|
||||
// Store CN in StringBuffer in case we need to report an error.
|
||||
// Store CN in StringBuilder in case we need to report an error.
|
||||
buf.append(" <");
|
||||
buf.append(cn);
|
||||
buf.append('>');
|
||||
|
|
|
@ -80,7 +80,7 @@ public class TestBasicScheme extends TestCase {
|
|||
|
||||
public void testBasicAuthenticationWith88591Chars() throws Exception {
|
||||
int[] germanChars = { 0xE4, 0x2D, 0xF6, 0x2D, 0xFc };
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (int i = 0; i < germanChars.length; i++) {
|
||||
buffer.append((char)germanChars[i]);
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ public class LocalTestServer {
|
|||
@Override
|
||||
public String toString() {
|
||||
ServerSocket ssock = servicedSocket; // avoid synchronization
|
||||
StringBuffer sb = new StringBuffer(80);
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
sb.append("LocalTestServer/");
|
||||
if (ssock == null)
|
||||
sb.append("stopped");
|
||||
|
|
|
@ -303,7 +303,7 @@ public class TestMultipartForm extends TestCase {
|
|||
};
|
||||
|
||||
private static String constructString(int [] unicodeChars) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
if (unicodeChars != null) {
|
||||
for (int i = 0; i < unicodeChars.length; i++) {
|
||||
buffer.append((char)unicodeChars[i]);
|
||||
|
|
Loading…
Reference in New Issue