qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lqu...@apache.org
Subject svn commit: r1769111 - /qpid/java/branches/remove-queue-runner/broker-core/src/main/java/org/apache/qpid/server/consumer/AbstractConsumerTarget.java
Date Thu, 10 Nov 2016 13:16:05 GMT
Author: lquack
Date: Thu Nov 10 13:16:05 2016
New Revision: 1769111

URL: http://svn.apache.org/viewvc?rev=1769111&view=rev
Log:
remove unnecessary code

Modified:
    qpid/java/branches/remove-queue-runner/broker-core/src/main/java/org/apache/qpid/server/consumer/AbstractConsumerTarget.java

Modified: qpid/java/branches/remove-queue-runner/broker-core/src/main/java/org/apache/qpid/server/consumer/AbstractConsumerTarget.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/remove-queue-runner/broker-core/src/main/java/org/apache/qpid/server/consumer/AbstractConsumerTarget.java?rev=1769111&r1=1769110&r2=1769111&view=diff
==============================================================================
--- qpid/java/branches/remove-queue-runner/broker-core/src/main/java/org/apache/qpid/server/consumer/AbstractConsumerTarget.java
(original)
+++ qpid/java/branches/remove-queue-runner/broker-core/src/main/java/org/apache/qpid/server/consumer/AbstractConsumerTarget.java
Thu Nov 10 13:16:05 2016
@@ -197,43 +197,12 @@ public abstract class AbstractConsumerTa
     {
         if(_state.compareAndSet(from, to))
         {
-            if (to == State.ACTIVE && _stateChangeListeners.size() > 1)
+            if(!_stateChangeListeners.isEmpty())
             {
-                int offset = _stateActivates.incrementAndGet();
-                if (offset >= _stateChangeListeners.size())
-                {
-                    _stateActivates.set(0);
-                    offset = 0;
-                }
-
-                List<StateChangeListener<ConsumerTarget, State>> holdovers =
new ArrayList<>();
-                int pos = 0;
                 for (StateChangeListener<ConsumerTarget, State> listener : _stateChangeListeners)
                 {
-                    if (pos++ < offset)
-                    {
-                        holdovers.add(listener);
-                    }
-                    else
-                    {
-                        listener.stateChanged(this, from, to);
-                    }
-                }
-                for (StateChangeListener<ConsumerTarget, State> listener : holdovers)
-                {
                     listener.stateChanged(this, from, to);
                 }
-
-            }
-            else
-            {
-                if(!_stateChangeListeners.isEmpty())
-                {
-                    for (StateChangeListener<ConsumerTarget, State> listener : _stateChangeListeners)
-                    {
-                        listener.stateChanged(this, from, to);
-                    }
-                }
             }
             if(_suspendedConsumerLoggingTicker != null)
             {



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


Mime
View raw message