sk0x50 commented on a change in pull request #727:
URL: https://github.com/apache/ignite-3/pull/727#discussion_r831976900



##########
File path: 
modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/RaftGroupServiceImpl.java
##########
@@ -613,7 +613,7 @@ else if (th instanceof SMFullThrowable)
      * @return {@code True} if this is a recoverable exception.
      */
     private boolean recoverable(Throwable t) {
-        return t.getCause() instanceof IOException || t.getCause() instanceof 
TimeoutException;
+        return t instanceof TimeoutException || (t.getCause() != null && 
t.getCause() instanceof IOException);

Review comment:
       You don't need to check `t.getCause()` for `null` value before using 
`instanceof`. So, this expression can be simplified:
   `return t instanceof TimeoutException || t.getCause() instanceof 
IOException;`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to