diff --git a/cloud-kotlin-extensions/src/main/kotlin/cloud/commandframework/kotlin/coroutines/KotlinAnnotatedMethods.kt b/cloud-kotlin-extensions/src/main/kotlin/cloud/commandframework/kotlin/coroutines/KotlinAnnotatedMethods.kt index 95a71e2e..34ea6704 100644 --- a/cloud-kotlin-extensions/src/main/kotlin/cloud/commandframework/kotlin/coroutines/KotlinAnnotatedMethods.kt +++ b/cloud-kotlin-extensions/src/main/kotlin/cloud/commandframework/kotlin/coroutines/KotlinAnnotatedMethods.kt @@ -69,12 +69,14 @@ private class KotlinMethodCommandExecutionHandler( context: CommandMethodContext ) : MethodCommandExecutionHandler(context) { + private val paramsWithoutContinuation = parameters().filterNot { Continuation::class.java == it.type }.toTypedArray() + override fun executeFuture(commandContext: CommandContext): CompletableFuture { val instance = context().instance() val params = createParameterValues( commandContext, commandContext.flags(), - this.parameters().filterNot { Continuation::class.java == it.type }.toTypedArray() + paramsWithoutContinuation ) // We need to propagate exceptions to the caller.