From d8dfb420bc8944918bfc00107de5ca4825b21493 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 19 Feb 2013 20:20:26 +0100 Subject: [PATCH] Turn static methods into instance methods. --- .../rhynodge/triggers/NewEpisodeTrigger.java | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java b/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java index 5f09560..5fc4537 100644 --- a/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java +++ b/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java @@ -130,8 +130,8 @@ public class NewEpisodeTrigger implements Trigger { summary = String.format("%d changed Torrent(s) for “%s!”", changedEpisodes.size(), reaction.name()); } DefaultOutput output = new DefaultOutput(summary); - output.addText("text/plain", generatePlainText(reaction, newEpisodes, changedEpisodes, allEpisodes)); - output.addText("text/html", generateHtmlText(reaction, newEpisodes, changedEpisodes, allEpisodes)); + output.addText("text/plain", generatePlainText(reaction)); + output.addText("text/html", generateHtmlText(reaction)); return output; } @@ -144,15 +144,9 @@ public class NewEpisodeTrigger implements Trigger { * * @param reaction * The reaction that was triggered - * @param newEpisodes - * The new episodes - * @param changedEpisodes - * The changed episodes - * @param allEpisodes - * All episodes * @return The plain text output */ - private static String generatePlainText(Reaction reaction, Collection newEpisodes, Collection changedEpisodes, Collection allEpisodes) { + private String generatePlainText(Reaction reaction) { StringBuilder stringBuilder = new StringBuilder(); if (!newEpisodes.isEmpty()) { stringBuilder.append(reaction.name()).append(" - New Episodes\n\n"); @@ -213,15 +207,9 @@ public class NewEpisodeTrigger implements Trigger { * * @param reaction * The reaction that was triggered - * @param newEpisodes - * The new episodes - * @param changedEpisodes - * The changed episodes - * @param allEpisodes - * All episodes * @return The HTML output */ - private static String generateHtmlText(Reaction reaction, Collection newEpisodes, Collection changedEpisodes, Collection allEpisodes) { + private String generateHtmlText(Reaction reaction) { StringBuilder htmlBuilder = new StringBuilder(); htmlBuilder.append("\n"); htmlBuilder.append("

").append(StringEscapeUtils.escapeHtml4(reaction.name())).append("

\n"); -- 2.7.4