The last thrown exception is often used in code that catches RetryException
.
Currently the cause is @Nullable
from the contract of java.lang.Throwable.getCause()
, but it shouldn't be for a RetryException
.
A side effect of that is that we can no longer create such an exception without the last exception that was thrown.
Comment From: sbrannen
A side effect of that is that we can no longer create such an exception without the last exception that was thrown.
FTR, we don't actually use the RetryException(String)
constructor, so we should remove that, leaving only the RetryException(String, Throwable)
constructor -- where the cause
is already not nullable.