KotlinAnnotatedMethods: Hold onto filtered params

This commit is contained in:
Jason Penilla 2021-10-04 15:50:17 -07:00 committed by Jason
parent 39a2738630
commit 8df3f28cb7

View file

@ -69,12 +69,14 @@ private class KotlinMethodCommandExecutionHandler<C>(
context: CommandMethodContext<C> context: CommandMethodContext<C>
) : MethodCommandExecutionHandler<C>(context) { ) : MethodCommandExecutionHandler<C>(context) {
private val paramsWithoutContinuation = parameters().filterNot { Continuation::class.java == it.type }.toTypedArray()
override fun executeFuture(commandContext: CommandContext<C>): CompletableFuture<Void?> { override fun executeFuture(commandContext: CommandContext<C>): CompletableFuture<Void?> {
val instance = context().instance() val instance = context().instance()
val params = createParameterValues( val params = createParameterValues(
commandContext, commandContext,
commandContext.flags(), commandContext.flags(),
this.parameters().filterNot { Continuation::class.java == it.type }.toTypedArray() paramsWithoutContinuation
) )
// We need to propagate exceptions to the caller. // We need to propagate exceptions to the caller.