Whitespace and lambda clean ups.
This commit is contained in:
parent
5283344927
commit
92d6be66ff
|
@ -87,12 +87,12 @@ public class LockingVisitors {
|
|||
* Java 8.
|
||||
*/
|
||||
private final L lock;
|
||||
|
||||
|
||||
/**
|
||||
* The guarded object.
|
||||
*/
|
||||
private final O object;
|
||||
|
||||
|
||||
/**
|
||||
* Supplies the read lock, usually from the lock object.
|
||||
*/
|
||||
|
|
|
@ -80,11 +80,11 @@ public class LockingVisitorsTest {
|
|||
public void testResultValidation() {
|
||||
final Object hidden = new Object();
|
||||
final StampedLockVisitor<Object> lock = LockingVisitors.stampedLockVisitor(hidden);
|
||||
final Object o1 = lock.applyReadLocked((h) -> {
|
||||
final Object o1 = lock.applyReadLocked(h -> {
|
||||
return new Object(); });
|
||||
assertNotNull(o1);
|
||||
assertNotSame(hidden, o1);
|
||||
final Object o2 = lock.applyWriteLocked((h) -> {
|
||||
final Object o2 = lock.applyWriteLocked(h -> {
|
||||
return new Object(); });
|
||||
assertNotNull(o2);
|
||||
assertNotSame(hidden, o2);
|
||||
|
|
Loading…
Reference in New Issue