Skip to content

Commit 314ab6b

Browse files
committed
Fix minor doc typo
1 parent f07884b commit 314ab6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

faqs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For async work that needs to be scheduled with a delay, Failsafe will either use
2626

2727
If no executor or scheduler is configured and the `ForkJoinPool.commonPool` has a parallelism of 1 (which occurs when the number of processors is <= 2), Failsafe will create and use an internal `ForkJoinPool` with a parallelism of 2 instead. This is necessary to support concurrent execution and `Timeout` checks. As with the internal `ScheduledExecutorService`, this `ForkJoinPool` will only be created if needed, and will be shared across all Failsafe instances that don't configure an executor.
2828

29-
## How to I throw an exception when retries are exceeded?
29+
## How do I throw an exception when retries are exceeded?
3030

3131
When a `RetryPolicy` is exceeded, the last execution result or exception is returned or thrown. In the case that a result was returned but an exception is desired, the best approach is to wrap a RetryPolicy in a Fallback that converts a failed result into an exception:
3232

strong-typing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ But for other policies you might declare a more specific result type:
1515

1616
```java
1717
RetryPolicy<HttpResponse> retryPolicy = RetryPolicy.<HttpResponse>builder()
18-
.handleResultIf(response -> response.getStatusCode == 500)
18+
.handleResultIf(response -> response.getStatusCode() == 500)
1919
.onFailedAttempt(e -> log.warn("Failed attempt: {}", e.getLastResult().getStatusCode()))
2020
.build();
2121
```

0 commit comments

Comments
 (0)