Fix a FindBugs warning by making the non-nullable type explicit
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 27 Nov 2016 00:57:45 +0000 (01:57 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 27 Nov 2016 00:57:45 +0000 (01:57 +0100)
src/main/kotlin/net/pterodactylus/sone/template/RenderFilter.kt

index 9f785ca..0db2a29 100644 (file)
@@ -69,7 +69,7 @@ class RenderFilter(private val core: Core, private val templateContextFactory: T
                renderLink(writer, "/external-link/?_CHECKED_HTTP_=${linkPart.link.urlEncode()}", linkPart.text, linkPart.title, "internet")
        }
 
-       private fun String.urlEncode() = URLEncoder.encode(this, "UTF-8")!!
+       private fun String.urlEncode(): String = URLEncoder.encode(this, "UTF-8")
 
        private fun render(writer: Writer, sonePart: SonePart) {
                if (sonePart.sone.name != null) {