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

Commit eaf2d73

Browse files
committed
値読み出し時、nullじゃなければそのまま代入してよいため修正
1 parent 0ffe7a8 commit eaf2d73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/kotlin/com/mapk/core/internal/ArgumentBinder.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ internal sealed class ArgumentBinder(val annotations: List<Annotation>) {
2424
override val requiredClazz: KClass<T>
2525
) : ArgumentBinder(annotations), ValueParameter<T> {
2626
override fun bindArgument(adaptor: ArgumentAdaptor, valueArray: Array<Any?>): Boolean {
27-
return if (adaptor.isInitialized(name)) {
28-
valueArray[index] = adaptor.readout(name)
27+
val value = adaptor.readout(name)
28+
return if (value != null || adaptor.isInitialized(name)) {
29+
valueArray[index] = value
2930
true
3031
} else {
3132
false

0 commit comments

Comments
 (0)