From 85f358b53d57578c199e2d2f799bf95272174650 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 27 Nov 2016 01:57:45 +0100 Subject: [PATCH] Fix a FindBugs warning by making the non-nullable type explicit --- src/main/kotlin/net/pterodactylus/sone/template/RenderFilter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.7.4