activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject [1/2] activemq git commit: https://issues.apache.org/jira/browse/AMQ-6434
Date Fri, 23 Sep 2016 12:05:13 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.14.x d3b86e77d -> 8bde32a07


https://issues.apache.org/jira/browse/AMQ-6434

Rewriting logic in finally block of PooledTaskRunner to avoid using a
return statement

(cherry picked from commit f25e7ab47f1bed223e30fc85afbe43ba1f4c93e6)


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a80f7ccb
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a80f7ccb
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a80f7ccb

Branch: refs/heads/activemq-5.14.x
Commit: a80f7ccbe1c0e60c3aa668b33e4dbdc3dbb21128
Parents: d3b86e7
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Fri Sep 23 07:50:12 2016 -0400
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Fri Sep 23 08:04:30 2016 -0400

----------------------------------------------------------------------
 .../activemq/thread/PooledTaskRunner.java       | 21 ++++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a80f7ccb/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
b/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
index 2425bc8..c8dc9d7 100644
--- a/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
+++ b/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
@@ -142,17 +142,16 @@ class PooledTaskRunner implements TaskRunner {
                 if (shutdown) {
                     queued = false;
                     runable.notifyAll();
-                    return;
-                }
-
-                // If we could not iterate all the items
-                // then we need to re-queue.
-                if (!done) {
-                    queued = true;
-                }
-
-                if (queued) {
-                    executor.execute(runable);
+                } else {
+                    // If we could not iterate all the items
+                    // then we need to re-queue.
+                    if (!done) {
+                        queued = true;
+                    }
+
+                    if (queued) {
+                        executor.execute(runable);
+                    }
                 }
 
             }


Mime
View raw message