Skip to content

Commit

Permalink
Avoid warning from un-accessed operation promise (#2280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns authored Oct 21, 2024
1 parent 25f5536 commit ac3526b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,11 @@ public <R> ExecuteNexusOperationOutput<R> executeNexusOperation(
? dataConverter.fromPayload(
b.get(), input.getResultClass(), input.getResultType())
: null);
// We register an empty handler to make sure that this promise is always "accessed" and never
// leads to a log about it being completed exceptionally and non-accessed.
// The "main" operation promise is the one returned from the execute method and that
// promise will always be logged if not accessed.
operationPromise.handle((ex, failure) -> null);
return new ExecuteNexusOperationOutput<>(result, operationPromise);
}

Expand Down

0 comments on commit ac3526b

Please sign in to comment.