Add throwExceptionIfClosed(); to most public methods for classes implementing Closeable, https://github.com/OpenHFT/Chronicle-Core/issues/116

This commit is contained in:
Peter Lawrey
2020-06-15 16:17:07 +01:00
parent a278b59300
commit 0c5a5c8909
9 changed files with 134 additions and 2 deletions
@@ -114,6 +114,7 @@ class OldDeletedEntriesCleanupThread extends Thread
@Override
public void run() {
throwExceptionIfClosed();
if (System.currentTimeMillis() - startTime < 1_000)
return;
@@ -175,6 +176,7 @@ class OldDeletedEntriesCleanupThread extends Thread
@Override
public boolean test(ReplicableEntry e) {
throwExceptionIfClosed();
if (shutdown)
return false;
if (e instanceof MapAbsentEntry) {