From 70f9d61313e654ee1670040e1fece57b88bfb09e Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 15 Mar 2006 23:29:39 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20bug=20which=20was=20exposed=20by=20the?= =?UTF-8?q?=20Stomp=20Ruby=20client.=20(We=20could=20really=20do=20with=20?= =?UTF-8?q?a=20maven=20integration=20build=20project=20that=20runs=20the?= =?UTF-8?q?=20C,=20C++,=20C#=C2=A0and=20Ruby=20code=20against=20a=20runnin?= =?UTF-8?q?g=20broker)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386215 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/transport/stomp/Subscription.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java index 0e556b0dcc..30dea7591b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java @@ -79,8 +79,7 @@ public class Subscription { builder.setBody(((ActiveMQTextMessage)m).getText().getBytes("UTF-8")); } else if( m.getDataStructureType() == ActiveMQBytesMessage.DATA_STRUCTURE_TYPE ) { ActiveMQBytesMessage msg = (ActiveMQBytesMessage)m; - byte data[] = new byte[(int) msg.getBodyLength()]; - msg.readBytes(data); + byte[] data = msg.getContent().getData(); builder.setBody(data); }