diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-10-04 16:56:35 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-10-04 16:56:35 +0200 |
commit | 08fb5bf3a1d6dc4e636c481b87ea077e0549bb89 (patch) | |
tree | df395f89958575d3d24b12cbc33d8f040768f2e6 | |
parent | 4e0ada338692def3cacf7e778f88265a3eaf6c04 (diff) |
Use else-if insteda of nested if
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java b/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java index 6308c0cb8db..a016f7d695c 100644 --- a/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java +++ b/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java @@ -137,12 +137,11 @@ public class ClusterMonitor<T> { catch (Throwable e) { if (shutdown && e instanceof InterruptedException) { break; + } else if ( ! (e instanceof Exception) ) { + log.log(Level.WARNING,"Error in monitor thread, will quit", e); + break; } else { log.log(Level.WARNING,"Exception in monitor thread", e); - if ( ! (e instanceof Exception) ) { - log.log(Level.WARNING,"Error in monitor thread, will quit", e); - break; - } } } } |