gemmellr commented on code in PR #4840: URL: https://github.com/apache/activemq-artemis/pull/4840#discussion_r1514766964
########## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageReader.java: ########## @@ -50,14 +50,15 @@ public DeliveryAnnotations getDeliveryAnnotations() { @Override public void close() { if (!closed) { - if (currentMessage != null) { - try { - currentMessage.deleteFile(); - } catch (Throwable error) { - ActiveMQServerLogger.LOGGER.errorDeletingLargeMessageFile(error); - } finally { - currentMessage = null; + try { + AMQPLargeMessage localCurrentMessage = currentMessage; Review Comment: There are various other usages of currentMessage that could probably benefit from similar update. -- 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