Skip to content

Commit 7993fa8

Browse files
committed
Suppress unused warning in AffinityLockDumpLocksTest
1 parent 1a7bea9 commit 7993fa8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

affinity/src/test/java/net/openhft/affinity/AffinityLockDumpLocksTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public void dumpLocksListsThreadsHoldingLocks() throws Exception {
2929
String name = "worker-" + i;
3030
Thread t = new Thread(() -> {
3131
try (AffinityLock lock = AffinityLock.acquireLock()) {
32+
supressUnusedWarning(lock);
3233
acquired.countDown();
3334
release.await();
3435
} catch (InterruptedException e) {
@@ -51,4 +52,8 @@ public void dumpLocksListsThreadsHoldingLocks() throws Exception {
5152
t.join();
5253
}
5354
}
55+
56+
static void supressUnusedWarning(AutoCloseable c) {
57+
// do nothing
58+
}
5459
}

0 commit comments

Comments
 (0)