This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 451d4e604402157c8df68be30bd5ec7209adcb9d Author: Gary Gregory <[email protected]> AuthorDate: Sat Jul 25 08:11:11 2026 -0400 Remove unnecessary parentheses. --- src/main/java/org/apache/commons/lang3/CachedRandomBits.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/lang3/CachedRandomBits.java b/src/main/java/org/apache/commons/lang3/CachedRandomBits.java index 62904c346..e3e7f008a 100644 --- a/src/main/java/org/apache/commons/lang3/CachedRandomBits.java +++ b/src/main/java/org/apache/commons/lang3/CachedRandomBits.java @@ -129,7 +129,7 @@ public int nextBits(final int bits) { // 1. Get byte from cache (bitIndex >> 3 converts bit index to byte index) // 2. Shift right by bit position within byte (bitIndex & 0x7) // 3. Mask to keep only the bits we want ((1 << generatedBitsInIteration) - 1) - result |= cache[bitIndex >> 3] >> (bitIndex & BIT_INDEX_MASK) & ((1 << generatedBitsInIteration) - 1); + result |= cache[bitIndex >> 3] >> (bitIndex & BIT_INDEX_MASK) & (1 << generatedBitsInIteration) - 1; // Update counters generatedBits += generatedBitsInIteration; bitIndex += generatedBitsInIteration;
