Skip to content

Conversation

@JacksonJang
Copy link
Contributor

I resolved #5433

SettableBeanProperty creatorProp = creator.findCreatorProperty(propName);

int ix = _propNameMatcher.matchName(propName);
SettableBeanProperty regularProp = (ix >= 0) ? _propsByIndex[ix] : null;
Copy link
Member

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.

Copy link
Contributor Author

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.

@cowtowncoder
Copy link
Member

@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.

@JacksonJang
Copy link
Contributor Author

Okay.
I’ll work on creating a plain Java test case that reproduces the issue.

@cowtowncoder
Copy link
Member

One thing I noticed is that in Java @JsonIgnore cannot be added to constructor parameter, so need to probably use a custom AnnotationIntrospector to fake it (not sure if/why/how Kotlin allows).
Or alternatively maybe @JsonIgnore is only added on backing Field, then, in Kotlin class.

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