Github user stanlyDoge commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2010#discussion_r184601120 --- 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 -- ActiveMQNullRefException calls super(ActiveMQExceptionType.NULL_REF), which as I understand invokes NULL_REF.createException.
---