From: David ‘Bombe’ Roden Date: Wed, 5 Sep 2012 11:45:59 +0000 (+0200) Subject: Turn templates into static members. X-Git-Tag: 0.8.3^2~53^2~2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=689913e068c06d6cd4bdff17f5da30be2000df6c;p=Sone.git Turn templates into static members. --- diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index 8302369..90744e7 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -60,10 +60,10 @@ public class ParserFilter implements Filter { private final TemplateContextFactory templateContextFactory; /** The template for {@link PlainTextPart}s. */ - private final Template plainTextTemplate = TemplateParser.parse(new StringReader("<%text|html>")); + private static final Template plainTextTemplate = TemplateParser.parse(new StringReader("<%text|html>")); /** The template for {@link FreenetLinkPart}s. */ - private final Template linkTemplate = TemplateParser.parse(new StringReader("\" href=\"<%link|html>\" title=\"<%title|html>\"><%text|html>")); + private static final Template linkTemplate = TemplateParser.parse(new StringReader("\" href=\"<%link|html>\" title=\"<%title|html>\"><%text|html>")); /** * Creates a new filter that runs its input through a {@link SoneTextParser}