Fixed comparison process.
MODIFY
src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt
src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt
@@ -201,8 +201,15 @@ internal class KotlinInstantiators(
defaultInstantiator: ValueInstantiator
): ValueInstantiator {
return if (beanDescriptor.beanClass.isKotlinClass()) {
- if (defaultInstantiator is StdValueInstantiator) {
- KotlinValueInstantiator(defaultInstantiator, cache, nullToEmptyCollection, nullToEmptyMap, nullIsSameAsDefault, strictNullChecks)
+ if (defaultInstantiator::class == StdValueInstantiator::class) {
+ KotlinValueInstantiator(
+ defaultInstantiator as StdValueInstantiator,
+ cache,
+ nullToEmptyCollection,
+ nullToEmptyMap,
+ nullIsSameAsDefault,
+ strictNullChecks
+ )
} else {
// TODO: return defaultInstantiator and let default method parameters and nullability go unused? or die with exception:
throw IllegalStateException("KotlinValueInstantiator requires that the default ValueInstantiator is StdValueInstantiator")

Fixed comparison process.