From 8e59cf4d5fdfefc027ce26f7adb1a775738012f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 14 Sep 2016 20:52:07 +0300 Subject: [PATCH] STOMP frame encode: Avoid StringBuilder resizing --- .../apache/activemq/artemis/core/protocol/stomp/StompFrame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 27b222b40e..044b2dbd8f 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 @@ -103,7 +103,7 @@ public class StompFrame { return buffer; } - StringBuilder head = new StringBuilder(); + StringBuilder head = new StringBuilder(512); head.append(command); head.append(Stomp.NEWLINE); // Output the headers.