activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r418619 - /incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
Date Sun, 02 Jul 2006 16:50:20 GMT
Author: chirino
Date: Sun Jul  2 09:50:19 2006
New Revision: 418619

URL: http://svn.apache.org/viewvc?rev=418619&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQ-665

Modified:
    incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java?rev=418619&r1=418618&r2=418619&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
Sun Jul  2 09:50:19 2006
@@ -145,7 +145,15 @@
             try {
                 byte preview[] = new byte[ (int)Math.min(length, 255) ];
                 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) {
                 rc.put("BodyPreview", new byte[]{});
             }



Mime
View raw message