This repository was archived by the owner on Jan 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/kotlin/com/mapk/krowmapper Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -81,17 +81,18 @@ internal sealed class ParameterForMap {
8181 }
8282}
8383
84- private fun KParameter.getDeserializer (): AbstractKColumnDeserializer <* , * , * >? {
84+ @Suppress(" UNCHECKED_CAST" )
85+ private fun <T : Any > ValueParameter<T>.getDeserializer (): AbstractKColumnDeserializer <* , * , T >? {
8586 val deserializers = this .annotations.mapNotNull { paramAnnotation ->
8687 paramAnnotation.annotationClass
8788 .findAnnotation<KColumnDeserializeBy >()
8889 ?.let { it.deserializer.primaryConstructor!! .call(paramAnnotation) }
8990 }
9091
9192 if (1 < deserializers.size)
92- throw IllegalArgumentException (" Find multiple deserializer from ${(this .type.classifier as KClass < * > ).jvmName} " )
93+ throw IllegalArgumentException (" Find multiple deserializer from ${(this .requiredClazz ).jvmName} " )
9394
94- return deserializers.singleOrNull()
95+ return deserializers.singleOrNull() as AbstractKColumnDeserializer < * , * , T > ?
9596}
9697
9798private fun <T : Any > KClass<T>.getDeserializer (): KFunction <T >? {
You can’t perform that action at this time.
0 commit comments