You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/12/29 09:55:33 UTC
[tomcat] 02/02: Remove lambdas
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 95ba57df171531fff8da664b4a3a31889f258582
Author: remm <re...@apache.org>
AuthorDate: Tue Dec 29 10:55:12 2020 +0100
Remove lambdas
---
test/org/apache/catalina/realm/TestJNDIRealm.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/test/org/apache/catalina/realm/TestJNDIRealm.java b/test/org/apache/catalina/realm/TestJNDIRealm.java
index 797f370..033a292 100644
--- a/test/org/apache/catalina/realm/TestJNDIRealm.java
+++ b/test/org/apache/catalina/realm/TestJNDIRealm.java
@@ -117,7 +117,7 @@ public class TestJNDIRealm {
@Test
public void testErrorRealm() throws Exception {
Context context = new TesterContext();
- JNDIRealm realm = new JNDIRealm();
+ final JNDIRealm realm = new JNDIRealm();
realm.setContainer(context);
realm.setUserSearch("");
// Connect to something that will fail
@@ -125,9 +125,16 @@ public class TestJNDIRealm {
realm.start();
final CountDownLatch latch = new CountDownLatch(3);
- (new Thread(() -> { realm.authenticate("foo", "bar"); latch.countDown(); })).start();
- (new Thread(() -> { realm.authenticate("foo", "bar"); latch.countDown(); })).start();
- (new Thread(() -> { realm.authenticate("foo", "bar"); latch.countDown(); })).start();
+ Runnable testThread = new Runnable() {
+ @Override
+ public void run() {
+ realm.authenticate("foo", "bar");
+ latch.countDown();
+ }
+ };
+ (new Thread(testThread)).start();
+ (new Thread(testThread)).start();
+ (new Thread(testThread)).start();
Assert.assertTrue(latch.await(30, TimeUnit.SECONDS));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org