Skip to content

Commit e6888d7

Browse files
committed
Simplify the condition
No need to do an inversion of a boolean when doing arithmetical comparison
1 parent 77f811b commit e6888d7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/org/fluentd/logger/sender/ConstantDelayReconnector.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ public void clearErrorHistory() {
4343
}
4444

4545
public boolean enableReconnection(long timestamp) {
46-
int size = errorHistory.size();
47-
if (size == 0) {
48-
return true;
49-
}
50-
51-
return (!(timestamp - errorHistory.getLast() < wait));
46+
return errorHistory.size() == 0 || timestamp - errorHistory.getLast() >= wait;
5247
}
5348
}

0 commit comments

Comments
 (0)