mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Throw an exception if no cleanup hook was registered.
This commit is contained in:
@@ -148,12 +148,9 @@ class CleanupManagerImpl implements CleanupManager, Service, EventListener {
|
|||||||
}
|
}
|
||||||
CleanupHook hook = hooks.get(cv);
|
CleanupHook hook = hooks.get(cv);
|
||||||
if (hook == null) {
|
if (hook == null) {
|
||||||
if (LOG.isLoggable(WARNING)) {
|
throw new IllegalStateException("No cleanup hook for " + cv);
|
||||||
LOG.warning("No cleanup hook for " + cv);
|
}
|
||||||
}
|
if (hook.deleteMessage(txn, g, m)) {
|
||||||
// Stop the timer so we don't keep trying to delete this message
|
|
||||||
db.stopCleanupTimer(txn, m);
|
|
||||||
} else if (hook.deleteMessage(txn, g, m)) {
|
|
||||||
Collection<MessageId> messageIds = deleted.get(g);
|
Collection<MessageId> messageIds = deleted.get(g);
|
||||||
if (messageIds == null) {
|
if (messageIds == null) {
|
||||||
messageIds = new ArrayList<>();
|
messageIds = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user