Skip to content

Conversation

k163377
Copy link
Contributor

@k163377 k163377 commented Nov 25, 2021

Reading the comments and the initialization process of the KotlinValueInstantiator, it looks like the defaultInstantiator of KotlinInstantiators.findValueInstantiator requires StdValueInstantiator.
On the other hand, this comparison is done with the is operator, which means that even if an instance that inherits StdValueInstantiator is passed, it will be treated as normal.

In this PR, this problem is fixed by comparing the Class.

Copy link
Member

@dinomite dinomite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, would you add yourself a line in the CREDITS-2.x file?

@dinomite
Copy link
Member

I wrote a test for this, so I added the credits line. Merging now!

@dinomite dinomite merged commit 1bc121d into FasterXML:2.13 Nov 26, 2021
@k163377 k163377 deleted the fix-findValueInstantiator branch January 9, 2022 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants