You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2018/03/04 05:03:51 UTC

groovy git commit: Remove lambda code in test code

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X afd75dc1b -> ea4c33064


Remove lambda code in test code


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

Branch: refs/heads/GROOVY_2_6_X
Commit: ea4c33064c1a922fbb673271412c24de9c8392aa
Parents: afd75dc
Author: danielsun1106 <re...@hotmail.com>
Authored: Sun Mar 4 13:01:43 2018 +0800
Committer: danielsun1106 <re...@hotmail.com>
Committed: Sun Mar 4 13:01:43 2018 +0800

----------------------------------------------------------------------
 .../memoize/ConcurrentCommonCacheTest.java      | 21 +++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/ea4c3306/src/test/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCacheTest.java
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCacheTest.java b/src/test/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCacheTest.java
index a8d57f5..687e5b1 100644
--- a/src/test/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCacheTest.java
+++ b/src/test/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCacheTest.java
@@ -214,15 +214,18 @@ public class ConcurrentCommonCacheTest {
         final AtomicInteger cnt = new AtomicInteger(0);
 
         for (int i = 0; i < threadNum; i++) {
-            new Thread(() -> {
-                try {
-                    countDownLatch.await();
-
-                    m.getAndPut(123, k -> cnt.getAndIncrement());
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                } finally {
-                    countDownLatch2.countDown();
+            new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        countDownLatch.await();
+
+                        m.getAndPut(123, k -> cnt.getAndIncrement());
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    } finally {
+                        countDownLatch2.countDown();
+                    }
                 }
             }).start();
         }