fixed bug which was exposed by the Stomp Ruby client. (We could really do with a maven integration build project that runs the C, C++, C# and Ruby code against a running broker)

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-15 23:29:39 +00:00
parent de74d7ac72
commit 70f9d61313
1 changed files with 1 additions and 2 deletions

View File

@ -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);
}