activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #2010: ARTEMIS-1801 removing null-unchecked de...
Date Fri, 27 Apr 2018 01:30:59 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2010#discussion_r184572931
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
---
    @@ -2712,6 +2714,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();
    +         NULL_REF.createException("Reference to message is null");
    --- End diff --
    
    @stanlyDoge what was your intention here? this last expression here is pretty much dead
code.. you are creating an exception and doing nothing with it... the previous logging would
work.. but the exception here is dead code.


---

Mime
View raw message