Skip to content

Commit 7dbc793

Browse files
committed
KotlinAnnotatedMethods: Hold onto filtered params
1 parent 179e77d commit 7dbc793

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cloud-kotlin-extensions/src/main/kotlin/cloud/commandframework/kotlin/coroutines/KotlinAnnotatedMethods.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ private class KotlinMethodCommandExecutionHandler<C>(
6969
context: CommandMethodContext<C>
7070
) : MethodCommandExecutionHandler<C>(context) {
7171

72+
private val paramsWithoutContinuation = parameters().filterNot { Continuation::class.java == it.type }.toTypedArray()
73+
7274
override fun executeFuture(commandContext: CommandContext<C>): CompletableFuture<Void?> {
7375
val instance = context().instance()
7476
val params = createParameterValues(
7577
commandContext,
7678
commandContext.flags(),
77-
this.parameters().filterNot { Continuation::class.java == it.type }.toTypedArray()
79+
paramsWithoutContinuation
7880
)
7981

8082
// We need to propagate exceptions to the caller.

0 commit comments

Comments
 (0)