From 46c49272ba995e5b87b1499d13a6424794ac4052 Mon Sep 17 00:00:00 2001 From: Tony Robalik Date: Sat, 9 Dec 2023 12:20:44 -0800 Subject: [PATCH] Fix deprecations relating to kotlinx-metadata update. --- .../internal/kotlin/kotlinMetadataVisibilities.kt | 2 +- .../kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/autonomousapps/internal/kotlin/kotlinMetadataVisibilities.kt b/src/main/kotlin/com/autonomousapps/internal/kotlin/kotlinMetadataVisibilities.kt index 5e3e303ac..deb66d8f9 100644 --- a/src/main/kotlin/com/autonomousapps/internal/kotlin/kotlinMetadataVisibilities.kt +++ b/src/main/kotlin/com/autonomousapps/internal/kotlin/kotlinMetadataVisibilities.kt @@ -27,7 +27,7 @@ internal val ClassNode.kotlinMetadata: KotlinClassMetadata? extraInt = get("xi") as Int? ) } - return KotlinClassMetadata.read(header) + return KotlinClassMetadata.readLenient(header) } internal fun KotlinClassMetadata?.isFileOrMultipartFacade() = diff --git a/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt b/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt index d6ef9a08b..f6a3f16c8 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt @@ -310,7 +310,7 @@ internal class KotlinMagicFinder( // See https://github.com/autonomousapps/dependency-analysis-gradle-plugin/issues/1035 // See https://youtrack.jetbrains.com/issue/KT-60870 val metadata = try { - KotlinClassMetadata.read(header.build()) + KotlinClassMetadata.readLenient(header.build()) } catch (e: IllegalArgumentException) { logger.debug("Can't read class file '$classFile'") errorsReport.appendText("Can't read class file '$classFile'\n")