You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by RaiSaurabh <gi...@git.apache.org> on 2017/11/27 07:33:24 UTC

[GitHub] activemq-artemis pull request #1670: ARTEMIS-1505: NPE prevents browsing que...

GitHub user RaiSaurabh opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1670

    ARTEMIS-1505: NPE prevents browsing queue with large messages

    This fixes ARTEMIS-1505.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/RaiSaurabh/activemq-artemis npe

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1670.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1670
    
----
commit fe8be8080bac5adebcf83b0bb2c7ce0bfc1c8bc1
Author: saurabhrai <ra...@hotmail.com>
Date:   2017-11-27T07:31:04Z

    ARTEMIS-1505: NPE prevents browsing queue with large messages

----


---

[GitHub] activemq-artemis pull request #1670: ARTEMIS-1505: NPE prevents browsing que...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1670


---

[GitHub] activemq-artemis pull request #1670: ARTEMIS-1505: NPE prevents browsing que...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1670#discussion_r153306767
  
    --- 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 --
    
    actually, never mind.. I amended it myself


---

[GitHub] activemq-artemis issue #1670: ARTEMIS-1505: NPE prevents browsing queue with...

Posted by RaiSaurabh <gi...@git.apache.org>.
Github user RaiSaurabh commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1670
  
    @clebertsuconic Could you update the status of the JIRA as the pull request is closed now.


---

[GitHub] activemq-artemis pull request #1670: ARTEMIS-1505: NPE prevents browsing que...

Posted by clebertsuconic <gi...@git.apache.org>.
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.


---