-
Notifications
You must be signed in to change notification settings - Fork 682
KotlinBeanInfoFactory.getBeanInfo
throws exception when introspecting getter on value class
#3109
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
Comments
Thanks for reaching out. While the exception is a bug, I'm not entirely sure about the overall handling of inline class properties. I'm leaning towards ignoring inline class properties as they do not adhere to the Java Beans design where getters do not accept any arguments except for by-index (for arrays or collections) access. Furthermore, the getters Kotlin generates ( So, we would consider only the inline class component as an actual property. Paging @sdeleuze for further thoughts. |
@mp911de I agree with this, as for serialization purposes value classes should be perceived as primitive types or strings, and thus not serialized as complex objects with nested properties. |
We now ignore Kotlin getters that are either static methods or would require additional arguments. Closes #3109
We now ignore Kotlin getters that are either static methods or would require additional arguments. Closes #3109
@mp911de thank you for the fast response! 🥇 |
That's fixed now. If you want, you can give the most recent snapshots (available from repo.spring.io) a try. |
Hi!
When upgrading from spring-data-commons 3.0.1 to 3.3.1 (also to 3.2.0, but on 3.1.0 works fine) the following code throws exception:
The exception:
I think it is potentially similar to #2964 and #2990.
The text was updated successfully, but these errors were encountered: