mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Currently randomNonNegativeLong() returns 0 half as often as any positive long, but random number generators are typically expected to return uniformly-distributed values unless otherwise specified. This fixes this issue by mapping Long.MIN_VALUE directly onto 0 rather than resampling.