-
Notifications
You must be signed in to change notification settings - Fork 26
CallExecutor fails if null is returned #42
Comments
So I feel like i may have designed myself into a bit of a corner here. Retry4j really only considers three result scenarios:
The problem that you're pointing out here is that when a null value comes back and there is logic expects that ANY value is a success executes, it blows up with a NPE due to that value being null. So anyhow, I could do what you're suggesting above and use
...that seems potentially ok? I might also just want to refactor the call executor to not use optionals the way it is now in which case a null result would just be considered a success which feels a little more natural and intuitive. Let me think about this a little before I rush a change. |
What I expect is that the |
Yea... in retrospect i might have overcomplicated things when thinking about it, the entire issue is just caused by me using an optional internally. Already have it fixed, I'll push it out soon. |
fixed with 0.7.3 release just now |
It is quite common that retryable call will produce
null
result. Now it is impossible to returnnull
because of:The text was updated successfully, but these errors were encountered: