From: David ‘Bombe’ Roden Date: Wed, 8 Jun 2011 10:36:08 +0000 (+0200) Subject: Remove exceptions from method signatures. X-Git-Tag: 0.6.5^2~9^2~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=38c1d04aefb25fa4418cfd9e9ce3474b6cd2696a;p=Sone.git Remove exceptions from method signatures. --- diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index 2122feb..2030807 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -106,13 +106,13 @@ public class ParserFilter implements Filter { // PRIVATE METHODS // - private void render(Writer writer, Iterable parts) throws IOException { + private void render(Writer writer, Iterable parts) { for (Part part : parts) { render(writer, part); } } - private void render(Writer writer, Part part) throws IOException { + private void render(Writer writer, Part part) { if (part instanceof PlainTextPart) { render(writer, (PlainTextPart) part); } else if (part instanceof FreenetLinkPart) { @@ -128,25 +128,25 @@ public class ParserFilter implements Filter { } } - private void render(Writer writer, PlainTextPart plainTextPart) throws IOException { + private void render(Writer writer, PlainTextPart plainTextPart) { TemplateContext templateContext = templateContextFactory.createTemplateContext(); templateContext.set("text", plainTextPart.getText()); plainTextTemplate.render(templateContext, writer); } - private void render(Writer writer, FreenetLinkPart freenetLinkPart) throws IOException { + private void render(Writer writer, FreenetLinkPart freenetLinkPart) { renderLink(writer, "/" + freenetLinkPart.getLink(), freenetLinkPart.getText(), freenetLinkPart.getTitle(), freenetLinkPart.isTrusted() ? "freenet-trusted" : "freenet"); } - private void render(Writer writer, LinkPart linkPart) throws IOException { + private void render(Writer writer, LinkPart linkPart) { renderLink(writer, "/?_CHECKED_HTTP_=" + linkPart.getLink(), linkPart.getText(), linkPart.getTitle(), "internet"); } - private void render(Writer writer, SonePart sonePart) throws IOException { + private void render(Writer writer, SonePart sonePart) { renderLink(writer, "viewSone.html?sone=" + sonePart.getSone().getId(), SoneAccessor.getNiceName(sonePart.getSone()), SoneAccessor.getNiceName(sonePart.getSone()), "in-sone"); } - private void render(Writer writer, PostPart postPart) throws IOException { + private void render(Writer writer, PostPart postPart) { renderLink(writer, "viewPost.html?post=" + postPart.getPost().getId(), getExcerpt(postPart.getPost().getText(), 20), SoneAccessor.getNiceName(postPart.getPost().getSone()), "in-sone"); }