jbertram commented on code in PR #5448: URL: https://github.com/apache/activemq-artemis/pull/5448#discussion_r1919150295
########## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java: ########## @@ -660,7 +659,7 @@ public void referenceOriginalMessage(final Message original, final SimpleString super.referenceOriginalMessage(original, originalQueue); - if (original instanceof LargeServerMessageImpl) { + if (original instanceof AMQPLargeMessage) { Review Comment: These two lines break the existing code: ```java AMQPLargeMessage m = new AMQPLargeMessage(0, 0, null, null, null); m.referenceOriginalMessage(new LargeServerMessageImpl((byte) 0, 0, null, null), SimpleString.of("foo")); ``` Causing this to be thrown: ``` java.lang.ClassCastException: class org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageImpl cannot be cast to class org.apache.activemq.artemis.protocol.amqp.broker.AMQPLargeMessage (org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageImpl and org.apache.activemq.artemis.protocol.amqp.broker.AMQPLargeMessage are in unnamed module of loader 'app') ``` It's not clear to me that this code is directly related to any conversion. If it was I would expect `org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageImpl#referenceOriginalMessage` to behave in a similar way. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact