Prevent warning about platform type
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 7 Apr 2017 20:38:46 +0000 (22:38 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 8 Apr 2017 13:22:56 +0000 (15:22 +0200)
src/main/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilter.kt

index a356028..5de5dfe 100644 (file)
@@ -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<String, Any?>?) =