franz1981 commented on a change in pull request #3577:
URL: https://github.com/apache/activemq-artemis/pull/3577#discussion_r631702256



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
##########
@@ -293,7 +293,7 @@ protected void init() throws OpenDataException {
             if (m.containsProperty(Message.HDR_LARGE_COMPRESSED)) {
                rc.put(CompositeDataConstants.TEXT_BODY, "[compressed]");
             } else {
-               final String text = m.getReadOnlyBodyBuffer().readString();
+               final String text = 
m.getReadOnlyBodyBuffer().readNullableSimpleString().toString();

Review comment:
       This shouldn't be
   ```java
   final SimpleString nullableText = 
m.getReadOnlyBodyBuffer().readNullableSimpleString();
   fina String text = nullableText == null? null : nullableText.toString();
   // ...
   ```
   because of
   ```java
      public static SimpleString readNullableSimpleString(ByteBuf buffer) {
         int b = buffer.readByte();
         if (b == DataConstants.NULL) {
            return null;
         }
         return readSimpleString(buffer);
      }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to