From: David ‘Bombe’ Roden Date: Fri, 26 Aug 2022 09:52:40 +0000 (+0200) Subject: ⬆️ Upgrade to Kotlin 1.7 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=0a8bee89e07058cf46f1966b22ed264c8b8a24fc ⬆️ Upgrade to Kotlin 1.7 And fix a bug while doing this! --- diff --git a/build.gradle b/build.gradle index c7e550e..b23af3d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id 'org.jetbrains.kotlin.jvm' version '1.4.32' - id 'org.jetbrains.kotlin.plugin.noarg' version '1.4.32' + id 'org.jetbrains.kotlin.jvm' version '1.7.10' + id 'org.jetbrains.kotlin.plugin.noarg' version '1.7.10' id 'info.solidsoft.pitest' version '1.7.4' id 'jacoco' } diff --git a/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt b/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt index c97a1fc..6af0fde 100644 --- a/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt +++ b/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt @@ -32,7 +32,7 @@ class SoneTextParser @Inject constructor(private val soneProvider: SoneProvider? else LinkType.values() .mapNotNull { it.findNext(remainder.second) } - .minBy { it.position } + .minByOrNull { it.position } .let { when { it == null -> PlainTextPart(remainder.second) to ""