Skip to content

Commit 187f40a

Browse files
committed
Changed so that kotlin-module cannot be used with Kotlin 1.4 or lower.
1 parent 3a09a78 commit 187f40a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinModule.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ class KotlinModule @Deprecated(
5454
val singletonSupport: SingletonSupport = DISABLED,
5555
val strictNullChecks: Boolean = false
5656
) : SimpleModule(KotlinModule::class.java.name, PackageVersion.VERSION) {
57+
init {
58+
if (!KotlinVersion.CURRENT.isAtLeast(1, 5)) {
59+
// Kotlin 1.4 was deprecated when this process was introduced(jackson-module-kotlin 2.15).
60+
throw IllegalStateException("jackson-module-kotlin requires Kotlin 1.5 or higher.")
61+
}
62+
}
63+
5764
@Deprecated(level = DeprecationLevel.HIDDEN, message = "For ABI compatibility")
5865
constructor(
5966
reflectionCacheSize: Int,

0 commit comments

Comments
 (0)