diff --git a/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java b/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java index 06944e38a..ab06e6a53 100644 --- a/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java +++ b/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java @@ -110,12 +110,10 @@ public class LockingVisitorsTest { public void testResultValidation() { final Object hidden = new Object(); final StampedLockVisitor lock = LockingVisitors.stampedLockVisitor(hidden); - final Object o1 = lock.applyReadLocked(h -> { - return new Object(); }); + final Object o1 = lock.applyReadLocked(h -> new Object()); assertNotNull(o1); assertNotSame(hidden, o1); - final Object o2 = lock.applyWriteLocked(h -> { - return new Object(); }); + final Object o2 = lock.applyWriteLocked(h -> new Object()); assertNotNull(o2); assertNotSame(hidden, o2); }