Closed efenderbosch closed 1 year ago
Hi @efenderbosch
I made a mistake initializing a field of TimeOrderedEpochFactory
. It was supposed to be initialized with the current time, but it was being initialized with zero. This caused the odd behaviour with fixed negative timestamps. I fixed it.
A also used your example to make sure this problem doesn't come back.
Thank you for reporting this.
Best regards
Released v5.2.1. 🎉
All values of (Epoch - 9999 ms) through the Epoch generate the same UUID, given the same "random" supplier.
At (Epoch - 10,000 ms), it wraps around back to the max encodable date of +10889-08-02T05:31:50.655Z.
Test code to show behavior:
And the output:
I think a reasonable solution would be for a fixed clock to throw an
IllegalArgumentException
if the time is before the Epoch.