activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r688014 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
Date Fri, 22 Aug 2008 08:11:00 GMT
Author: jstrachan
Date: Fri Aug 22 01:11:00 2008
New Revision: 688014

URL: http://svn.apache.org/viewvc?rev=688014&view=rev
Log:
fixed bad use of null for AMQ-1904

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java?rev=688014&r1=688013&r2=688014&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
Fri Aug 22 01:11:00 2008
@@ -26,6 +26,7 @@
 
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
+import javax.jms.Destination;
 import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.CompositeDataSupport;
@@ -154,7 +155,7 @@
             rc.put("JMSCorrelationID", m.getJMSCorrelationID());
             rc.put("JMSDestination", "" + m.getJMSDestination());
             rc.put("JMSMessageID", m.getJMSMessageID());
-            rc.put("JMSReplyTo", "" + m.getJMSReplyTo());
+            rc.put("JMSReplyTo",toString(m.getJMSReplyTo()));
             rc.put("JMSType", m.getJMSType());
             rc.put("JMSDeliveryMode", m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ?
"PERSISTENT" : "NON-PERSISTENT");
             rc.put("JMSExpiration", Long.valueOf(m.getJMSExpiration()));
@@ -212,6 +213,13 @@
             return rc;
         }
 
+        protected String toString(Object value) {
+            if (value == null) {
+                return null;
+            }
+            return value.toString();
+        }
+
 
         protected <T> TabularType createTabularType(Class<T> type, OpenType openType)
throws OpenDataException {
             String typeName = "java.util.Map<java.lang.String, " + type.getName() + ">";



Mime
View raw message