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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

pgfox
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 <[hidden email]>
Date:   2017-11-27T07:31:04Z

    ARTEMIS-1505: NPE prevents browsing queue with large messages

----


---
Reply | Threaded
Open this post in threaded view
|

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

pgfox
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 | Threaded
Open this post in threaded view
|

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

pgfox
In reply to this post by pgfox
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


---
Reply | Threaded
Open this post in threaded view
|

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

pgfox
In reply to this post by pgfox
Github user asfgit closed the pull request at:

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


---
Reply | Threaded
Open this post in threaded view
|

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

pgfox
In reply to this post by pgfox
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.


---