MAILBOX-372 QuotaThresholdCrossingListener should not catch exceptions
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/45691e92 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/45691e92 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/45691e92 Branch: refs/heads/master Commit: 45691e92cbfb2d565f066bf9f7724a9682a79a3c Parents: 369d4db Author: Benoit Tellier <[email protected]> Authored: Wed Jan 16 11:51:57 2019 +0700 Committer: Benoit Tellier <[email protected]> Committed: Thu Jan 17 18:01:13 2019 +0700 ---------------------------------------------------------------------- .../listeners/QuotaThresholdCrossingListener.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/45691e92/mailbox/plugin/quota-mailing/src/main/java/org/apache/james/mailbox/quota/mailing/listeners/QuotaThresholdCrossingListener.java ---------------------------------------------------------------------- diff --git a/mailbox/plugin/quota-mailing/src/main/java/org/apache/james/mailbox/quota/mailing/listeners/QuotaThresholdCrossingListener.java b/mailbox/plugin/quota-mailing/src/main/java/org/apache/james/mailbox/quota/mailing/listeners/QuotaThresholdCrossingListener.java index 73c6b1c..900d0fd 100644 --- a/mailbox/plugin/quota-mailing/src/main/java/org/apache/james/mailbox/quota/mailing/listeners/QuotaThresholdCrossingListener.java +++ b/mailbox/plugin/quota-mailing/src/main/java/org/apache/james/mailbox/quota/mailing/listeners/QuotaThresholdCrossingListener.java @@ -37,15 +37,12 @@ import org.apache.james.mailbox.quota.mailing.commands.DetectThresholdCrossingHa import org.apache.james.mailbox.quota.mailing.subscribers.QuotaThresholdMailer; import org.apache.james.user.api.UsersRepository; import org.apache.mailet.MailetContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import com.google.common.collect.ImmutableSet; public class QuotaThresholdCrossingListener implements MailboxListener.GroupMailboxListener { private static class QuotaThresholdCrossingListenerGroup extends Group {} - private static final Logger LOGGER = LoggerFactory.getLogger(QuotaThresholdCrossingListener.class); private static final Group GROUP = new QuotaThresholdCrossingListenerGroup(); private final EventSourcingSystem eventSourcingSystem; @@ -72,12 +69,8 @@ public class QuotaThresholdCrossingListener implements MailboxListener.GroupMail @Override public void event(Event event) { - try { - if (event instanceof QuotaUsageUpdatedEvent) { - handleEvent(event.getUser(), (QuotaUsageUpdatedEvent) event); - } - } catch (Exception e) { - LOGGER.error("Can not re-emmit quota threshold events", e); + if (event instanceof QuotaUsageUpdatedEvent) { + handleEvent(event.getUser(), (QuotaUsageUpdatedEvent) event); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
