From: David ‘Bombe’ Roden Date: Fri, 7 Apr 2017 20:38:46 +0000 (+0200) Subject: Prevent warning about platform type X-Git-Tag: 0.9.7^2~267 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f7d0c519d77d47e61f2b6accad8c7f16a785b8be;p=Sone.git Prevent warning about platform type --- diff --git a/src/main/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilter.kt b/src/main/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilter.kt index a356028..5de5dfe 100644 --- a/src/main/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilter.kt +++ b/src/main/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilter.kt @@ -17,7 +17,7 @@ class LinkedElementRenderFilter(private val templateContextFactory: TemplateCont private val loadedImageTemplate = """<%include linked/image.html>""".parse() private val notLoadedImageTemplate = """<%include linked/notLoaded.html>""".parse() - private fun String.parse() = StringReader(this).use { TemplateParser.parse(it) } + private fun String.parse() = StringReader(this).use { TemplateParser.parse(it) }!! } override fun format(templateContext: TemplateContext?, data: Any?, parameters: Map?) =