Open jhalterman opened 3 years ago
Small improvement, though I'm not sure if it's worth doing. Thoughts?
--
This is meant to make it slightly (maybe? arguably?) easier to write FailurePolicy.handleIf statements that are specifically typed. Ex:
policy.handleIf((Object result, HttpException failure) -> failure.isServerError())
policy.<HttpException>handleIf((result, failure) -> failure.isServerError());
This could open the door for ClassCastExceptions, but those are ignored by FailurePoilicy: https://github.com/failsafe-lib/failsafe/blob/master/src/main/java/net/jodah/failsafe/FailurePolicy.java#L160-L162
After code is missing method name, should be:
🤦 thanks, edited.
Small improvement, though I'm not sure if it's worth doing. Thoughts?
--
This is meant to make it slightly (maybe? arguably?) easier to write FailurePolicy.handleIf statements that are specifically typed. Ex:
Before
After
This could open the door for ClassCastExceptions, but those are ignored by FailurePoilicy: https://github.com/failsafe-lib/failsafe/blob/master/src/main/java/net/jodah/failsafe/FailurePolicy.java#L160-L162