diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java index 1d37194d35..0193fdb290 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java @@ -117,7 +117,7 @@ public class StompFrame return buffer; } - StringBuffer head = new StringBuffer(); + StringBuilder head = new StringBuilder(); head.append(command); head.append(Stomp.NEWLINE); // Output the headers. @@ -148,7 +148,7 @@ public class StompFrame return buffer; } - protected void encodeHeaders(StringBuffer head) + protected void encodeHeaders(StringBuilder head) { for (Map.Entry header : headers.entrySet()) { diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java index 2a38d40f0a..783c8454c9 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java @@ -39,7 +39,7 @@ public class StompFrameV11 extends StompFrame } @Override - protected void encodeHeaders(StringBuffer head) + protected void encodeHeaders(StringBuilder head) { for (Header h : allHeaders) {