Skip to content

Commit

Permalink
CORE-13168: Check whether the Kotlin metadata is compatible. (#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisr3 authored May 2, 2023
1 parent 102b7fa commit 373cf7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/kotlin-reflection/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
compileOnly "co.paralleluniverse:quasar-osgi-annotations:$quasarVersion"
implementation platform("net.corda:corda-api:$cordaApiVersion")

testCompileOnly "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
testCompileOnly 'org.jetbrains:annotations'
testImplementation "org.assertj:assertj-core:$assertjVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5Version"
testRuntimeOnly "org.jetbrains.kotlinx:kotlinx-metadata-jvm:$kotlinMetadataVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ private fun <T : Any> Metadata.forKotlinType(
is KotlinClassMetadata.Class -> KotlinClassImpl.KmClassType(clazz, klazz, pool, km.toKmClass())
is KotlinClassMetadata.FileFacade -> KotlinClassImpl.KmPackageType(clazz, klazz, pool, km.toKmPackage())
is KotlinClassMetadata.MultiFileClassPart -> KotlinClassImpl.KmPackageType(clazz, klazz, pool, km.toKmPackage())
null -> throw IllegalArgumentException("Incompatible Kotlin metadata version '${metadataVersion.joinToString(".")}'.")
else -> throw IllegalArgumentException("Unsupported Kotlin class type: $km")
}
}
Expand Down
2 changes: 1 addition & 1 deletion osgi-framework-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ plugins {
dependencies {
compileOnly platform("net.corda:corda-api:$cordaApiVersion")
compileOnly 'org.osgi:osgi.core'
compileOnly "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
compileOnly 'org.jetbrains:annotations'
}

0 comments on commit 373cf7e

Please sign in to comment.