Skip to content

Commit 5ced96c

Browse files
committed
Fixed comparison process.
1 parent 1b4f5ac commit 5ced96c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,15 @@ internal class KotlinInstantiators(
201201
defaultInstantiator: ValueInstantiator
202202
): ValueInstantiator {
203203
return if (beanDescriptor.beanClass.isKotlinClass()) {
204-
if (defaultInstantiator is StdValueInstantiator) {
205-
KotlinValueInstantiator(defaultInstantiator, cache, nullToEmptyCollection, nullToEmptyMap, nullIsSameAsDefault, strictNullChecks)
204+
if (defaultInstantiator::class == StdValueInstantiator::class) {
205+
KotlinValueInstantiator(
206+
defaultInstantiator as StdValueInstantiator,
207+
cache,
208+
nullToEmptyCollection,
209+
nullToEmptyMap,
210+
nullIsSameAsDefault,
211+
strictNullChecks
212+
)
206213
} else {
207214
// TODO: return defaultInstantiator and let default method parameters and nullability go unused? or die with exception:
208215
throw IllegalStateException("KotlinValueInstantiator requires that the default ValueInstantiator is StdValueInstantiator")

0 commit comments

Comments
 (0)