Skip to content

Commit 7f6f31f

Browse files
committed
Minor javadoc fixes
1 parent e6124a7 commit 7f6f31f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

core/src/main/java/dev/failsafe/internal/FallbackExecutor.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public FallbackExecutor(FallbackImpl<R> fallback, int policyIndex) {
4040
}
4141

4242
/**
43-
* Performs an execution by calling pre-execute else calling the supplier, applying a fallback if it fails, and
44-
* calling post-execute.
43+
* Performs an execution by applying the {@code innerFn}, applying a fallback if it fails, and calling post-execute.
4544
*/
4645
@Override
4746
public Function<SyncExecutionInternal<R>, ExecutionResult<R>> apply(
@@ -70,7 +69,8 @@ public Function<SyncExecutionInternal<R>, ExecutionResult<R>> apply(
7069
}
7170

7271
/**
73-
* Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.
72+
* Performs an async execution by applying the {@code innerFn}, applying a fallback if it fails, and calling
73+
* post-execute.
7474
*/
7575
@Override
7676
public Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> applyAsync(
@@ -91,11 +91,13 @@ public Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>
9191
CompletableFuture<ExecutionResult<R>> promise = new CompletableFuture<>();
9292
Callable<R> callable = () -> {
9393
try {
94-
CompletableFuture<R> fallbackFuture = fallback.applyStage(result.getResult(), result.getException(), execution);
94+
CompletableFuture<R> fallbackFuture = fallback.applyStage(result.getResult(), result.getException(),
95+
execution);
9596
fallbackFuture.whenComplete((innerResult, exception) -> {
9697
if (exception instanceof CompletionException)
9798
exception = exception.getCause();
98-
ExecutionResult<R> r = exception == null ? result.withResult(innerResult) : ExecutionResult.exception(exception);
99+
ExecutionResult<R> r =
100+
exception == null ? result.withResult(innerResult) : ExecutionResult.exception(exception);
99101
promise.complete(r);
100102
});
101103
} catch (Throwable t) {

0 commit comments

Comments
 (0)