From: David ‘Bombe’ Roden Date: Sun, 27 Nov 2016 00:57:45 +0000 (+0100) Subject: Fix a FindBugs warning by making the non-nullable type explicit X-Git-Tag: 0.9.7^2~386 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=85f358b53d57578c199e2d2f799bf95272174650;p=Sone.git Fix a FindBugs warning by making the non-nullable type explicit --- diff --git a/src/main/kotlin/net/pterodactylus/sone/template/RenderFilter.kt b/src/main/kotlin/net/pterodactylus/sone/template/RenderFilter.kt index 9f785ca..0db2a29 100644 --- a/src/main/kotlin/net/pterodactylus/sone/template/RenderFilter.kt +++ b/src/main/kotlin/net/pterodactylus/sone/template/RenderFilter.kt @@ -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) {