File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -162,13 +162,18 @@ internal class KotlinValueInstantiator(
162
162
) {
163
163
callable.isAccessible = true
164
164
}
165
- val callableParametersByName = linkedMapOf<KParameter , Any ?>()
166
- callableParameters.mapIndexed { idx, paramDef ->
167
- if (paramDef != null ) {
168
- callableParametersByName[paramDef] = jsonParamValueList[idx]
165
+ ArgumentBucket (callable.parameters).apply {
166
+ callableParameters.forEachIndexed { idx, paramDef ->
167
+ if (paramDef != null ) {
168
+ this [paramDef] = jsonParamValueList[idx]
169
+ }
169
170
}
171
+ }.let {
172
+ if (it.isFullInitialized())
173
+ SpreadWrapper .call(callable, it.valueArray)
174
+ else
175
+ callable.callBy(it)
170
176
}
171
- callable.callBy(callableParametersByName)
172
177
}
173
178
174
179
}
You can’t perform that action at this time.
0 commit comments