From: David ‘Bombe’ Roden Date: Sat, 29 Jun 2013 15:30:22 +0000 (+0200) Subject: Always unwrap the optional. X-Git-Tag: 0.8.6^2~16 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=087be9942658312af89b5de144e6103868f6f278;p=Sone.git Always unwrap the optional. --- diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index 8833a2d..bd6903b 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -94,7 +94,7 @@ public class ParserFilter implements Filter { int cutOffLength = Numbers.safeParseInteger(parameters.get("cut-off-length"), Numbers.safeParseInteger(templateContext.get(String.valueOf(parameters.get("cut-off-length"))), length)); Object sone = parameters.get("sone"); if (sone instanceof String) { - sone = core.getSone((String) sone); + sone = core.getSone((String) sone).orNull(); } FreenetRequest request = (FreenetRequest) templateContext.get("request"); SoneTextParserContext context = new SoneTextParserContext(request, (Sone) sone);