Use StringBuilder instead of StringBuffer on STOMP encode

This commit is contained in:
Ville Skyttä 2015-07-21 19:08:41 +03:00
parent 615a9881b5
commit 214a1dc1eb
2 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ public class StompFrame
return buffer; return buffer;
} }
StringBuffer head = new StringBuffer(); StringBuilder head = new StringBuilder();
head.append(command); head.append(command);
head.append(Stomp.NEWLINE); head.append(Stomp.NEWLINE);
// Output the headers. // Output the headers.
@ -148,7 +148,7 @@ public class StompFrame
return buffer; return buffer;
} }
protected void encodeHeaders(StringBuffer head) protected void encodeHeaders(StringBuilder head)
{ {
for (Map.Entry<String, String> header : headers.entrySet()) for (Map.Entry<String, String> header : headers.entrySet())
{ {

View File

@ -39,7 +39,7 @@ public class StompFrameV11 extends StompFrame
} }
@Override @Override
protected void encodeHeaders(StringBuffer head) protected void encodeHeaders(StringBuilder head)
{ {
for (Header h : allHeaders) for (Header h : allHeaders)
{ {