You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for parameter name introspection on Kotlin inline classes [SPR-17466] #21998
In org.springframework.core.KotlinReflectionParameterDiscoverer::get ParameterNames() spring tries to get names of parameters, by getting the kotlin function and calling getParameters() on it.
If you use the new inline class feature (since kotlin 1.3) in data classes, spring data mongo can not build the mapper, because the function mentioned above, returns null.
The cause for this is, that kotlin create a syntetic constructer as the default constructor, that unboxes the inline classes.
Because of that, the ReflectJvmMapping.getKotlinFunction returns null, as the function is not a kotlin function, but a created one.
The getParameterNames function should support syntetic functions, if somehow possible, so we can use inline classes fully in the spring framework.
@reckter Inline classes are experimental in 1.3, so I am not sure we should do anything in 5.2, and I am wondering if that should not be raised on Kotlin side. Any thoughts?
Spring Data now provides dedicated related support and Spring Framework 6.1 also improved value Kotlin value classe support, so as I am not sure this old issue is valid anymore, I close it.
Activity
spring-projects-issues commentedon Nov 5, 2018
Juergen Hoeller commented
Sébastien Deleuze, if there is a chance to bring this forward to 5.1.x (without a full upgrade to Kotlin 1.3 on our end), feel free to go for it...
sdeleuze commentedon Mar 27, 2019
@reckter Inline classes are experimental in 1.3, so I am not sure we should do anything in 5.2, and I am wondering if that should not be raised on Kotlin side. Any thoughts?
sdeleuze commentedon Dec 7, 2023
Spring Data now provides dedicated related support and Spring Framework 6.1 also improved value Kotlin value classe support, so as I am not sure this old issue is valid anymore, I close it.