failsafe v2.4.4 Release Notes
-
๐ Bug Fixes
- ๐ Fixed #298 -
Fallback.onFailedAttempt
not being called correctly
๐ Improvements
- ๐ Fixed #296 - Add Automatic-Module-Name entry to the generated manifest file
API Changes
- โ Added a generic result type
R
toExecutionContext
,Execution
,AsyncExecution
, andAsyncRunnable
. This ensures that result types are unified across the API. It does mean that there are a few minor breaking changes to the API:ContextualSupplier
now has an additional result type parameterR
. Normally this type is used as lambda parameters where the type is inferred, so most users should not be impacted. But any explicit generic declaration of this type will not compile until the new parameter is added.PolicyExecutor
, which is part of the SPI, now accepts an additional result type parameterR
. This is only relevant for SPI users who are implementing their own Policies.
- ๐ Changed
FailsafeExecutor.getAsyncExecution
to acceptAsyncRunnable
instead ofAsyncSupplier
. This is a breaking change for anygetAsyncExecution
calls, but the fix is to simply remove anyreturn
statement. The reason for this change is that the provided object does not need to return a result since the result will already be passed asynchronously to one of theAsyncExecution
complete
orretry
methods.
- ๐ Fixed #298 -