Use string template syntax.

This commit is contained in:
Tobias Preuss 2020-06-21 20:05:08 +02:00
parent 3e79da6a79
commit 178bdff62a

View File

@ -69,7 +69,7 @@ data class HomeServerConnectionConfig(
*/ */
fun withHomeServerUri(hsUri: Uri): Builder { fun withHomeServerUri(hsUri: Uri): Builder {
if (hsUri.scheme != "http" && hsUri.scheme != "https") { if (hsUri.scheme != "http" && hsUri.scheme != "https") {
throw RuntimeException("Invalid home server URI: " + hsUri) throw RuntimeException("Invalid home server URI: $hsUri")
} }
// ensure trailing / // ensure trailing /
val hsString = hsUri.toString().ensureTrailingSlash() val hsString = hsUri.toString().ensureTrailingSlash()