Simplify lambdas.
This commit is contained in:
parent
348cf47741
commit
5d05df0f9e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue