Skip to content

Commit

Permalink
[static analysis burndown] remove identical catch branch (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
luxe committed May 28, 2021
1 parent 43ac32e commit 1c8e248
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .bazelci/static_analysis_checks.xml
Expand Up @@ -85,7 +85,6 @@
<exclude name="ForLoopsMustUseBraces"/>
<exclude name="FormalParameterNamingConventions"/>
<exclude name="GenericsNaming"/>
<exclude name="IdenticalCatchBranches"/>
<exclude name="IfElseStmtsMustUseBraces"/>
<exclude name="IfStmtsMustUseBraces"/>
<exclude name="LinguisticNaming"/>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/build/buildfarm/common/redis/RedisClient.java
Expand Up @@ -122,7 +122,8 @@ public <T> T call(JedisContext<T> withJedis) throws IOException {
}
throw e;
}
} catch (JedisMisconfigurationException e) {
} catch (JedisMisconfigurationException | JedisNoReachableClusterNodeException e) {
// In regards to a Jedis misconfiguration,
// the backplane is configured not to accept writes currently
// as a result of an error. The error is meant to indicate
// that substantial resources were unavailable.
Expand All @@ -131,8 +132,6 @@ public <T> T call(JedisContext<T> withJedis) throws IOException {
// we are technically not at RESOURCE_EXHAUSTED, this is a
// persistent state which can exist long past the error
throw new IOException(Status.UNAVAILABLE.withCause(e).asRuntimeException());
} catch (JedisNoReachableClusterNodeException e) {
throw new IOException(Status.UNAVAILABLE.withCause(e).asRuntimeException());
} catch (JedisConnectionException e) {
if ((e.getMessage() != null && e.getMessage().equals("Unexpected end of stream."))
|| e.getCause() instanceof ConnectException) {
Expand Down

0 comments on commit 1c8e248

Please sign in to comment.