diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java index 5e4dc749f3..7d29a33442 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java @@ -635,9 +635,12 @@ public interface Message { default Map toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { - //some property is SimpleString, which is not available for management console Object value = getObjectProperty(name.toString()); - map.put(name.toString(), value == null ? null : value.toString()); + //some property is SimpleString, which is not available for management console + if (value instanceof SimpleString) { + value = value.toString(); + } + map.put(name.toString(), value); } return map; }