Skip to content

Apache Lucene open-source search software

SOLR-6405: Remove unnecessary attemptCount > 0 check.

Mark Robert Miller9f4144e8e2ae
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
index c9c89fdd153..1fa89048c7f 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
@@ -118,9 +118,7 @@ public class ZkCmdExecutor {
* the number of the attempts performed so far
*/
protected void retryDelay(int attemptCount) throws InterruptedException {
- if (attemptCount > 0) {
- Thread.sleep((attemptCount + 1) * retryDelay);
- }
+ Thread.sleep((attemptCount + 1) * retryDelay);
}
}