You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2019/06/18 11:14:18 UTC

[qpid-broker-j] 01/04: QPID-8318 : Queue.Purge does not return deleted count

This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit aa3302da7dadc3a66c4a9242de829350b7f37929
Author: rgodfrey <rg...@apache.org>
AuthorDate: Mon May 27 11:26:45 2019 +0200

    QPID-8318 : Queue.Purge does not return deleted count
    
    (cherry picked from commit 9ded8dbcc69cd3ae07d095c05ad29ee6db3dfbd5)
---
 .../main/java/org/apache/qpid/server/queue/AbstractQueue.java | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
index 0275f6c..8bfee78 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
@@ -1710,20 +1710,13 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
         while (queueListIterator.advance())
         {
             final QueueEntry node = queueListIterator.getNode();
-            boolean acquired = node.acquireOrSteal(new Runnable()
-                                                    {
-                                                        @Override
-                                                        public void run()
-                                                        {
-                                                            dequeueEntry(node);
-                                                        }
-                                                    });
+            boolean acquired = node.acquireOrSteal(() -> dequeueEntry(node));
 
             if (acquired)
             {
                 dequeueEntry(node, txn);
+                count++;
             }
-
         }
 
         txn.commit();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org