You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2019/05/27 09:27:26 UTC

[qpid-broker-j] branch master updated: QPID-8318 : Queue.Purge does not return deleted count

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9ded8db  QPID-8318 : Queue.Purge does not return deleted count
9ded8db is described below

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

    QPID-8318 : Queue.Purge does not return deleted count
---
 .../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 d0f2f30..375732b 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
@@ -1748,20 +1748,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