Whitespace and lambda clean ups.

This commit is contained in:
Gary Gregory 2020-07-11 17:21:25 -04:00
parent 5283344927
commit 92d6be66ff
2 changed files with 4 additions and 4 deletions

View File

@ -87,12 +87,12 @@ public static class LockVisitor<O, L> {
* Java 8. * Java 8.
*/ */
private final L lock; private final L lock;
/** /**
* The guarded object. * The guarded object.
*/ */
private final O object; private final O object;
/** /**
* Supplies the read lock, usually from the lock object. * Supplies the read lock, usually from the lock object.
*/ */

View File

@ -80,11 +80,11 @@ public void testReentrantReadWriteLockExclusive() throws Exception {
public void testResultValidation() { public void testResultValidation() {
final Object hidden = new Object(); final Object hidden = new Object();
final StampedLockVisitor<Object> lock = LockingVisitors.stampedLockVisitor(hidden); final StampedLockVisitor<Object> lock = LockingVisitors.stampedLockVisitor(hidden);
final Object o1 = lock.applyReadLocked((h) -> { final Object o1 = lock.applyReadLocked(h -> {
return new Object(); }); return new Object(); });
assertNotNull(o1); assertNotNull(o1);
assertNotSame(hidden, o1); assertNotSame(hidden, o1);
final Object o2 = lock.applyWriteLocked((h) -> { final Object o2 = lock.applyWriteLocked(h -> {
return new Object(); }); return new Object(); });
assertNotNull(o2); assertNotNull(o2);
assertNotSame(hidden, o2); assertNotSame(hidden, o2);