Skip to content

Commit

Permalink
Restore shutdown IOException
Browse files Browse the repository at this point in the history
The signature for close() can't throw an exception for AutoCloseable, but the definition of shutdown() didn't have to change.  Move the try-catch into close().
  • Loading branch information
Steve Vaughan Jr committed Aug 22, 2022
1 parent 3fee706 commit a0e2cac
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,19 @@ public MiniJournalCluster getJournalCluster() {
return journalCluster;
}

public void shutdown() {
public void shutdown() throws IOException {
cluster.shutdown();
journalCluster.shutdown();
}

@Override
public void close() {
try {
journalCluster.shutdown();
shutdown();
} catch (IOException shutdownFailure) {
LOG.warn("Exception while closing journal cluster", shutdownFailure);
}
}

@Override
public void close() {
shutdown();
}

}

0 comments on commit a0e2cac

Please sign in to comment.