Skip to content

Commit a19ab3a

Browse files
committed
Is empty is better than checking is the size is 0
1 parent e6888d7 commit a19ab3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

4545
public boolean enableReconnection(long timestamp) {
46-
return errorHistory.size() == 0 || timestamp - errorHistory.getLast() >= wait;
46+
return errorHistory.isEmpty() || timestamp - errorHistory.getLast() >= wait;
4747
}
4848
}

0 commit comments

Comments
 (0)