Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements #1084

Merged
merged 7 commits into from
Nov 22, 2024
Merged

Improvements #1084

merged 7 commits into from
Nov 22, 2024

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Nov 22, 2024

  • remove useless adding of AsyncSupport to the FaultToleranceContext
  • improve CoroutineSupport.fromFuture()
  • rename interceptionContext to invocationContext on remaining places
  • remove useless toCompletableFuture() after Uni.subscribeAsCompletionStage()
  • add deployment-time validation of missing Guard/TypedGuard beans
  • add support for Kotlin suspend functions to @ApplyGuard
  • rename FaultToleranceContext.get() to call()

The `AsyncSupport` is never looked up from the `FaultToleranceContext`,
so there's no need to put it there in the first place.
In addition to checking if the `Future` is already complete, this commit
also checks if the `Future` is already cancelled. In both cases registering
a completion callback is a waste of time.
Previously, when SmallRye Fault Tolerance's `InvocationContext` was
renamed to `FaultToleranceContext`, some of the `interceptionContext`
variables were renamed to `invocationContext` (now that there's no
ambiguity). This commit finishes that rename.
…tage()

The `Uni.subscribeAsCompletionStage()` method returns `CompletableFuture`,
so calling `toCompletableFuture()` on it makes no sense.
This is because there are other `get()` methods, with parameters, whose
purpose is completely different. Therefore, the zero-parameter version
of `get()` is renamed back to `call()`, as it was before. This means
that the `FaultToleranceContext` class can no longer implement `Supplier`,
and we don't want it to implement `Callable` either. Fortunately, that
has never been useful for anything, so this commit just drops it.
@Ladicek Ladicek added this to the 6.7.0 milestone Nov 22, 2024
@Ladicek Ladicek merged commit d0a7c64 into smallrye:main Nov 22, 2024
13 checks passed
@Ladicek Ladicek deleted the improvements branch November 22, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant