clebertsuconic commented on a change in pull request #2480: ARTEMIS-2212 Avoid using CLQ on ServerConsumerImpl URL: https://github.com/apache/activemq-artemis/pull/2480#discussion_r248709999
########## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java ########## @@ -509,21 +518,16 @@ public synchronized void close(final boolean failed) throws Exception { removeItself(); - LinkedList<MessageReference> refs = cancelRefs(failed, false, null); - - Iterator<MessageReference> iter = refs.iterator(); + List<MessageReference> refs = cancelRefs(failed, false, null); Transaction tx = new TransactionImpl(storageManager); - while (iter.hasNext()) { - MessageReference ref = iter.next(); - + refs.forEach(ref -> { Review comment: Ohhh... ok.. it's on the list from cancelRefs.. I confused as being the main list. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services