diff --git a/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java b/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java index 7f9832fd43c..d497c117814 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java @@ -251,7 +251,7 @@ public class TestPayloadsOnVectors extends LuceneTestCase { for (int i = 0; i < len; ++i) { terms[i] = RandomPicks.randomFrom(random(), sampleTerms); if (weird) { - positionsIncrements[i] = random().nextInt(1 << 18); + positionsIncrements[i] = _TestUtil.nextInt(random(), 1, 1 << 18); startOffsets[i] = random().nextInt(); endOffsets[i] = random().nextInt(); } else if (i == 0) {