Support for parameter name introspection on Kotlin inline classes [SPR-17466] #21998
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: invalid
An issue that we don't feel is valid
theme: kotlin
An issue related to Kotlin support
type: enhancement
A general enhancement
reckter opened SPR-17466 and commented
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.
Affects: 5.1.2
Issue Links:
The text was updated successfully, but these errors were encountered: