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 +3
-3
lines changed
src/main/kotlin/com/mapk/kmapper Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class PlainKMapper<T : Any> private constructor(
4747 parameterMap[alias!! ]?.let {
4848 // javaGetterを呼び出す方が高速
4949 javaGetter.isAccessible = true
50- argumentAdaptor.putIfAbsent(alias!! , javaGetter.invoke(src)?.let { value -> it.mapObject(value) })
50+ argumentAdaptor.putIfAbsent(alias!! ) { javaGetter.invoke(src)?.let { value -> it.mapObject(value) } }
5151 // 終了判定
5252 if (argumentAdaptor.isFullInitialized()) return
5353 }
@@ -58,7 +58,7 @@ class PlainKMapper<T : Any> private constructor(
5858 src.forEach { (key, value) ->
5959 parameterMap[key]?.let { param ->
6060 // 取得した内容がnullでなければ適切にmapする
61- argumentAdaptor.putIfAbsent(key as String , value?.let { param.mapObject(value) })
61+ argumentAdaptor.putIfAbsent(key as String ) { value?.let { param.mapObject(value) } }
6262 // 終了判定
6363 if (argumentAdaptor.isFullInitialized()) return
6464 }
@@ -69,7 +69,7 @@ class PlainKMapper<T : Any> private constructor(
6969 val key = srcPair.first.toString()
7070
7171 parameterMap[key]?.let {
72- argumentBucket.putIfAbsent(key, srcPair.second?.let { value -> it.mapObject(value) })
72+ argumentBucket.putIfAbsent(key) { srcPair.second?.let { value -> it.mapObject(value) } }
7373 }
7474 }
7575
You can’t perform that action at this time.
0 commit comments