mirror of https://github.com/apache/activemq.git
Fix for
http://issues.apache.org/activemq/browse/AMQ-665 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
be742f2339
commit
7113c5efd8
|
@ -145,7 +145,15 @@ public class OpenTypeSupport {
|
||||||
try {
|
try {
|
||||||
byte preview[] = new byte[ (int)Math.min(length, 255) ];
|
byte preview[] = new byte[ (int)Math.min(length, 255) ];
|
||||||
m.readBytes(preview);
|
m.readBytes(preview);
|
||||||
rc.put("BodyPreview", preview);
|
|
||||||
|
// This is whack! Java 1.5 JMX spec does not support primitive arrays!
|
||||||
|
// In 1.6 it seems it is supported.. but until then...
|
||||||
|
Byte data[] = new Byte[ preview.length ];
|
||||||
|
for (int i = 0; i < data.length; i++) {
|
||||||
|
data[i] = new Byte(preview[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
rc.put("BodyPreview", data);
|
||||||
} catch (JMSException e) {
|
} catch (JMSException e) {
|
||||||
rc.put("BodyPreview", new byte[]{});
|
rc.put("BodyPreview", new byte[]{});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue