From e109cda56d1ec3a44cb48ae7477e183d8c2d6ba7 Mon Sep 17 00:00:00 2001 From: Vladimir Petrakovich Date: Mon, 30 Dec 2019 12:46:45 +0300 Subject: [PATCH] fix ABI compatibility of KotlinModule constructor --- .../jackson/module/kotlin/KotlinModule.kt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinModule.kt b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinModule.kt index a4bee433..2832bb5e 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinModule.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinModule.kt @@ -10,7 +10,20 @@ fun Class<*>.isKotlinClass(): Boolean { return declaredAnnotations.any { it.annotationClass.java.name == metadataFqName } } -class KotlinModule @JvmOverloads constructor (val reflectionCacheSize: Int = 512, val nullToEmptyCollection: Boolean = false, val nullToEmptyMap: Boolean = false, val nullisSameAsDefault: Boolean = false) : SimpleModule(PackageVersion.VERSION) { +class KotlinModule constructor ( + val reflectionCacheSize: Int = 512, + val nullToEmptyCollection: Boolean = false, + val nullToEmptyMap: Boolean = false, + val nullisSameAsDefault: Boolean = false +) : SimpleModule(PackageVersion.VERSION) { + + @Deprecated(level = DeprecationLevel.HIDDEN, message = "For ABI compatibility") + constructor( + reflectionCacheSize: Int = 512, + nullToEmptyCollection: Boolean = false, + nullToEmptyMap: Boolean = false + ) : this(reflectionCacheSize, nullToEmptyCollection, nullToEmptyMap, false) + companion object { const val serialVersionUID = 1L }