Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 53d5ca7

Browse files
committed
微修正
1 parent 3850753 commit 53d5ca7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/kotlin/com/mapk/kmapper/KMapper.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ private fun <T : Any, R : Any> mapObject(param: ParameterForMap<R>, value: T): A
176176
// creatorに一致する組み合わせが有れば設定されていればそれを使う
177177
creator != null -> creator.call(value)
178178
// 要求された値がenumかつ元が文字列ならenum mapperでマップ
179-
param.javaClazz.isEnum && value is String -> EnumMapper.getEnum(
180-
param.clazz.java,
181-
value
182-
)
179+
param.javaClazz.isEnum && value is String -> EnumMapper.getEnum(param.clazz.java, value)
183180
// 要求されているパラメータがStringならtoStringする
184181
param.clazz == String::class -> value.toString()
185182
else -> throw IllegalArgumentException("Can not convert $valueClazz to ${param.clazz}")

0 commit comments

Comments
 (0)