diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java index 7e7239e6805..ca152860e18 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java @@ -81,8 +81,7 @@ public class JitterScheduledThreadPoolExecutorImpl extends ScheduledThreadPoolEx public long getDelay(TimeUnit unit) { long baseDelay = wrapped.getDelay(unit); long spreadTime = (long) (baseDelay * spread); - long delay = spreadTime <= 0 ? baseDelay - : baseDelay + ThreadLocalRandom.current().nextLong(-spreadTime, spreadTime); + long delay = baseDelay + ThreadLocalRandom.current().nextLong(-spreadTime, spreadTime); // Ensure that we don't roll over for nanoseconds. return (delay < 0) ? baseDelay : delay; }