[ 
https://issues.apache.org/jira/browse/ARTEMIS-1801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16456510#comment-16456510
 ] 

ASF GitHub Bot commented on ARTEMIS-1801:
-----------------------------------------

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

    https://github.com/apache/activemq-artemis/pull/2010#discussion_r184701274
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ---
    @@ -2712,6 +2713,11 @@ private Message makeCopy(final MessageReference ref, 
final boolean expiry) throw
        private Message makeCopy(final MessageReference ref,
                                 final boolean expiry,
                                 final boolean copyOriginalHeaders) throws 
Exception {
    +      if (ref == null) {
    +         ActiveMQServerLogger.LOGGER.nullRefMessage();
    +         throw new ActiveMQNullRefException("Reference to message is 
null");
    --- End diff --
    
    The method I saw didn't have a throw.. I'm not sure what happened to github 
diffs here.


> Remove dereferences before null check
> -------------------------------------
>
>                 Key: ARTEMIS-1801
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1801
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Stanislav Knot
>            Assignee: Stanislav Knot
>            Priority: Minor
>
> There are some dereferences before object is checked for null.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to