From 087be9942658312af89b5de144e6103868f6f278 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 29 Jun 2013 17:30:22 +0200 Subject: [PATCH] Always unwrap the optional. --- src/main/java/net/pterodactylus/sone/template/ParserFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.7.4