# HG changeset patch # User Da Risk # Date 1777952660 14400 # Node ID 7e40819b3fe2a6ecab27141529291c3edf7023cb # Parent 5c6baebd860de200c32e5a88d9f289f08e0d9a54 core: fix a few warnings diff -r 5c6baebd860d -r 7e40819b3fe2 core/src/commonMain/kotlin/licensee/LicenseeParser.kt --- a/core/src/commonMain/kotlin/licensee/LicenseeParser.kt Mon May 04 18:53:53 2026 -0400 +++ b/core/src/commonMain/kotlin/licensee/LicenseeParser.kt Mon May 04 23:44:20 2026 -0400 @@ -45,11 +45,11 @@ } val items: List = json.decodeFromString(buffered.readUtf8()) - return items.associate { - val name = it.name ?: "${it.groupId}:${it.artifactId}" - val license = it.spdxLicenses.firstNotNullOfOrNull { + return items.associate { item -> + val name = item.name ?: "${item.groupId}:${item.artifactId}" + val license = item.spdxLicenses.firstNotNullOfOrNull { "${it.name}\n\n${it.url}" - } ?: it.unknownLicenses.firstNotNullOf { + } ?: item.unknownLicenses.firstNotNullOf { "${it.name}\n\n${it.url}" } name to license diff -r 5c6baebd860d -r 7e40819b3fe2 core/src/iosMain/kotlin/licenseplist/LicensePlistParser.kt --- a/core/src/iosMain/kotlin/licenseplist/LicensePlistParser.kt Mon May 04 18:53:53 2026 -0400 +++ b/core/src/iosMain/kotlin/licenseplist/LicensePlistParser.kt Mon May 04 23:44:20 2026 -0400 @@ -28,6 +28,7 @@ import kotlinx.cinterop.memScoped import kotlinx.cinterop.ptr import kotlinx.cinterop.value +import kotlinx.coroutines.suspendCancellableCoroutine import platform.Foundation.NSBundle import platform.Foundation.NSData import platform.Foundation.NSError @@ -37,7 +38,6 @@ import platform.Foundation.dataWithContentsOfURL import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException -import kotlin.coroutines.suspendCoroutine /** * Parse LicensePlist files @@ -87,10 +87,11 @@ } @OptIn(ExperimentalForeignApi::class, BetaInteropApi::class) - private suspend fun NSData.toPropertyList(): Any? = suspendCoroutine { cont -> + private suspend fun NSData.toPropertyList(): Any? = suspendCancellableCoroutine { cont -> val parsed = memScoped { val error: ObjCObjectVar = alloc() - val result = NSPropertyListSerialization.propertyListWithData(this@toPropertyList, + val result = NSPropertyListSerialization.propertyListWithData( + this@toPropertyList, options = NSPropertyListMutableContainers, format = null, error.ptr