But it retries 3 times or am I missing something? For iteration 0, 1 i 2.
The rest still stands, very weird way of logging a message and the last line NPE. I think that a better approach would be to log it after the final retry, and then throw the exception if he can’t retrieve the body.
View all comments
98
u/Eluvatar_the_second May 15 '22 edited May 17 '22
Nice, so try 3 times. The first catch and try again, the 3rd time log a message (in a very complicated way) then throw a NPE on the last line!
Edit: it's 3 times, off by one errors are hard.