Simplify lambdas.

This commit is contained in:
Gary Gregory 2020-08-14 23:35:42 -04:00
parent 348cf47741
commit 5d05df0f9e
1 changed files with 2 additions and 4 deletions

View File

@ -110,12 +110,10 @@ public class LockingVisitorsTest {
public void testResultValidation() {
final Object hidden = new Object();
final StampedLockVisitor<Object> 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);
}