mirror of https://github.com/apache/activemq.git
fixed bad use of null for AMQ-1904
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@688014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9cd9a00dc3
commit
a634647560
|
@ -26,6 +26,7 @@ import java.util.Set;
|
|||
|
||||
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 @@ public final class OpenTypeSupport {
|
|||
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 @@ public final class OpenTypeSupport {
|
|||
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() + ">";
|
||||
|
|
Loading…
Reference in New Issue