-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix #4629: Handle conflicting creatorProp + ignore conflict (Kotlin data class compatibility) #5439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.x
Are you sure you want to change the base?
Conversation
…ignored when deserializing Records
…ignored when deserializing Records
…(Kotlin data class compatibility)
| SettableBeanProperty creatorProp = creator.findCreatorProperty(propName); | ||
|
|
||
| int ix = _propNameMatcher.matchName(propName); | ||
| SettableBeanProperty regularProp = (ix >= 0) ? _propsByIndex[ix] : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so my problem here is the double lookups in every case, even if in most cases single lookup (for CreatorProperty) should be necessary.
Now, in theory, _propNameMatcher lookup should be enough (matcher should be superset of ALL SettableBeanProperty entries, and type of property could be checked separately, as needed.
I am trying concurrent changes to do that, but having some problems. Alternatively this PR could be refactored to limit need for extra lookups I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the answer :)
I’ll review that part of the code as well and try refactoring it.
Once I make the improvements, I’ll update the PR.
|
@JacksonJang Can we actually reproduce the issue with plain Java? It'd be very useful to have test here instead of requiring Kotlin module's test. |
|
Okay. |
|
One thing I noticed is that in Java |
I resolved #5433