You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/03/22 09:52:14 UTC

[GitHub] [ignite-3] sk0x50 commented on a change in pull request #727: IGNITE-16683 Ignite-3 enable jdbc tests

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org