⬆️ Upgrade to Kotlin 1.7
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Aug 2022 09:52:40 +0000 (11:52 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Aug 2022 09:52:40 +0000 (11:52 +0200)
And fix a bug while doing this!

build.gradle
src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt

index c7e550e..b23af3d 100644 (file)
@@ -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'
 }
index c97a1fc..6af0fde 100644 (file)
@@ -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 ""