From daf92dc922daa85e01a29bb7733c66a9bf5ab3d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Aug 2015 18:50:55 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20send=20mail=20on=20an=20empty=20?= =?utf8?q?state?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/net/pterodactylus/rhynodge/engine/ReactionRunner.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java b/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java index e658f1b..f4ae72e 100644 --- a/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java +++ b/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java @@ -119,9 +119,6 @@ public class ReactionRunner implements Runnable { logger.debug(format("Filtering state through %s...", filter.getClass().getSimpleName())); try { currentState = filter.filter(currentState); - if (currentState.success() && currentState.isEmpty()) { - errorEmailAction.execute(createEmptyStateOutput(reaction, currentState)); - } } catch (Throwable t1) { logger.warn(format("Error during filter %s for %s.", filter.getClass().getSimpleName(), reaction.name()), t1); return new FailedState(t1); @@ -131,10 +128,4 @@ public class ReactionRunner implements Runnable { return currentState; } - private Output createEmptyStateOutput(Reaction reaction, State state) { - DefaultOutput defaultOutput = new DefaultOutput(String.format("Reached Empty State for “%s!”", reaction.name())); - defaultOutput.addText("text/plain", String.format("The %s for %s was empty.", state.getClass().getSimpleName(), reaction.name())); - return defaultOutput; - } - } -- 2.7.4