spring-cloud-commons
spring-cloud-commons copied to clipboard
Improve readability of method "isRetryException"
The "isRetryExhausted" check only depends on the throwable itself. The new code makes this more clear because the check is no longer part of anyMatch's lambda expression. I also extracted the method "isInstanceOfRetryType" because it makes it obvious that we do the same check on the throwable itself and its cause.