After the reset() all the buckets were resetted and currentIndex is set to 0.
But we are returning the currentBucket (which could be something else not necessarily to be 0th bucket).
I think we should return buckets[currentIndex] after the reset(). However, since failures or successes will be captured in a different bucket only once, is it worth addressing?
failsafe/core/src/main/java/dev/failsafe/internal/TimedCircuitStats.java
Line 209 in 98bb496
After the reset() all the buckets were resetted and currentIndex is set to 0.
failsafe/core/src/main/java/dev/failsafe/internal/TimedCircuitStats.java
Line 213 in 98bb496
But we are returning the currentBucket (which could be something else not necessarily to be 0th bucket).
I think we should return
buckets[currentIndex]after thereset(). However, since failures or successes will be captured in a different bucket only once, is it worth addressing?