Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2010#discussion_r180859389 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java --- @@ -2712,6 +2712,10 @@ 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) { + return null; --- End diff -- I would actually throw an Exception.. you're not supposed to make a copy of a ref == null. it's a valid assertion, but I would actually make it throw NullPointerException here. (Or a chosen exception).
---