From 00ecdb4a025e6733be4287b20124de7a073a68b8 Mon Sep 17 00:00:00 2001 From: pivovarit Date: Mon, 15 May 2017 08:01:51 +0200 Subject: [PATCH] refactor executeThreads --- .../concurrent/locks/SharedObjectWithLockManualTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core-java/src/test/java/com/baeldung/concurrent/locks/SharedObjectWithLockManualTest.java b/core-java/src/test/java/com/baeldung/concurrent/locks/SharedObjectWithLockManualTest.java index 9b82ced642..4dccbc3e26 100644 --- a/core-java/src/test/java/com/baeldung/concurrent/locks/SharedObjectWithLockManualTest.java +++ b/core-java/src/test/java/com/baeldung/concurrent/locks/SharedObjectWithLockManualTest.java @@ -66,9 +66,7 @@ public class SharedObjectWithLockManualTest { private void executeThreads(SharedObjectWithLock object, int threadCount, ExecutorService service) { for (int i = 0; i < threadCount; i++) { - service.execute(() -> { - object.perform(); - }); + service.execute(object::perform); } }