From 0a8bee89e07058cf46f1966b22ed264c8b8a24fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 26 Aug 2022 11:52:40 +0200 Subject: [PATCH 1/1] =?utf8?q?=E2=AC=86=EF=B8=8F=20Upgrade=20to=20Kotlin?= =?utf8?q?=201.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit And fix a bug while doing this! --- build.gradle | 4 ++-- src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 "" -- 2.7.4