This repository was archived by the owner on Jan 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/main/kotlin/com/mapk/kmapper Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ internal class ParameterForMap<T : Any>(
2020 }
2121 // リストの長さが小さいと期待されるためこの形で実装しているが、理想的にはmap的なものが使いたい
2222 @Suppress(" UNCHECKED_CAST" )
23- private val converters: Set <Pair <KClass <* >, KFunction <T >>> =
23+ private val converters: Set <Pair <KClass <* >, KFunction <T >>> by lazy {
2424 (param.getConverters() as Set <Pair <KClass <* >, KFunction <T >>>) + clazz.getConverters()
25+ }
2526
2627 private val convertCache: ConcurrentMap <KClass <* >, ParameterProcessor > = ConcurrentHashMap ()
2728
Original file line number Diff line number Diff line change @@ -17,8 +17,9 @@ internal class PlainParameterForMap<T : Any>(
1717 }
1818 // リストの長さが小さいと期待されるためこの形で実装しているが、理想的にはmap的なものが使いたい
1919 @Suppress(" UNCHECKED_CAST" )
20- private val converters: Set <Pair <KClass <* >, KFunction <T >>> =
20+ private val converters: Set <Pair <KClass <* >, KFunction <T >>> by lazy {
2121 (param.getConverters() as Set <Pair <KClass <* >, KFunction <T >>>) + clazz.getConverters()
22+ }
2223
2324 fun <U : Any > mapObject (value : U ): Any? {
2425 val valueClazz: KClass <* > = value::class
You can’t perform that action at this time.
0 commit comments