Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1670#discussion_r153276101
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
 ---
    @@ -267,10 +268,14 @@ protected void init() throws OpenDataException {
           public Map<String, Object> getFields(MessageReference ref) throws 
OpenDataException {
              Map<String, Object> rc = super.getFields(ref);
              ICoreMessage m = ref.getMessage().toCore();
    -         ActiveMQBuffer bodyCopy = m.getReadOnlyBodyBuffer();
    -         byte[] bytes = new byte[bodyCopy.readableBytes()];
    -         bodyCopy.readBytes(bytes);
    -         rc.put(CompositeDataConstants.BODY, bytes);
    +         if (!(m instanceof LargeServerMessageImpl)) {
    --- End diff --
    
    can you make a quick amend here? m.isLargeMessage instead?
    
    
    That is important as I'm currently refactoring large message, and this 
class may change the name or location.


---

Reply via email to