activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: AMQ-6602 - Removing lambdas for java 7 compatibility
Date Thu, 23 Feb 2017 15:57:39 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.14.x 7ca411fee -> 789f82b34


AMQ-6602 - Removing lambdas for java 7 compatibility

(cherry picked from commit 1f53b124bcdc41e6241c811f6854c42855deaf6a)


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

Branch: refs/heads/activemq-5.14.x
Commit: 789f82b34bd4103448e25ae16f53d95946619809
Parents: 7ca411f
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Thu Feb 23 10:55:20 2017 -0500
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Thu Feb 23 10:57:32 2017 -0500

----------------------------------------------------------------------
 .../activemq/thread/TaskRunnerFactoryTest.java  | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/789f82b3/activemq-client/src/test/java/org/apache/activemq/thread/TaskRunnerFactoryTest.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/test/java/org/apache/activemq/thread/TaskRunnerFactoryTest.java
b/activemq-client/src/test/java/org/apache/activemq/thread/TaskRunnerFactoryTest.java
index 0d3ecb5..273c0ed 100644
--- a/activemq-client/src/test/java/org/apache/activemq/thread/TaskRunnerFactoryTest.java
+++ b/activemq-client/src/test/java/org/apache/activemq/thread/TaskRunnerFactoryTest.java
@@ -46,14 +46,24 @@ public class TaskRunnerFactoryTest {
         final List<TaskRunner> runners = Collections.synchronizedList(new ArrayList<>(10));
 
         for (int i = 0; i < 10; i++) {
-            service.execute(() -> {
-                try {
-                    latch1.await();
-                } catch (InterruptedException e) {
-                   throw new IllegalStateException(e);
+            service.execute(new Runnable() {
+
+                @Override
+                public void run() {
+                    try {
+                        latch1.await();
+                    } catch (InterruptedException e) {
+                       throw new IllegalStateException(e);
+                    }
+                    runners.add(factory.createTaskRunner(new Task() {
+
+                        @Override
+                        public boolean iterate() {
+                            return false;
+                        }
+                    }, "task"));
+                    latch2.countDown();
                 }
-                runners.add(factory.createTaskRunner(() -> true, "task") );
-                latch2.countDown();
             });
         }
 


Mime
View raw message