This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit e3552a530ddf54ee7f9d2ddf2137b5b8f171a925 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Sep 12 10:14:00 2024 -0400 Remove redundant call to super() Use final Remove redundant syntax --- .../java/org/apache/commons/lang3/CachedRandomBitsTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/CachedRandomBitsTest.java b/src/test/java/org/apache/commons/lang3/CachedRandomBitsTest.java index 6f8c8c951..6e548e73b 100644 --- a/src/test/java/org/apache/commons/lang3/CachedRandomBitsTest.java +++ b/src/test/java/org/apache/commons/lang3/CachedRandomBitsTest.java @@ -38,13 +38,12 @@ public class CachedRandomBitsTest { private int index; MockRandom(final byte[] outputs) { - super(); this.outputs = outputs.clone(); this.index = 0; } @Override - public void nextBytes(byte[] bytes) { + public void nextBytes(final byte[] bytes) { Objects.requireNonNull(bytes, "bytes"); if (index + bytes.length > outputs.length) { throw new IllegalStateException("Not enough outputs given in MockRandom"); @@ -56,8 +55,8 @@ public class CachedRandomBitsTest { @ParameterizedTest @ValueSource(ints = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 32}) - public void testNext(int cacheSize) { - MockRandom random = new MockRandom(new byte[]{ + public void testNext(final int cacheSize) { + final MockRandom random = new MockRandom(new byte[]{ 0x11, 0x12, 0x13, 0x25, (byte) 0xab, (byte) 0xcd, (byte) 0xef, (byte) 0xff, 0x55, 0x44, 0x12, 0x34, @@ -68,7 +67,7 @@ public class CachedRandomBitsTest { 0x00, 0x00, 0x00, 0x00, }); - CachedRandomBits arb = new CachedRandomBits(cacheSize, random); + final CachedRandomBits arb = new CachedRandomBits(cacheSize, random); assertThrows(IllegalArgumentException.class, () -> arb.nextBits(0)); assertThrows(IllegalArgumentException.class, () -> arb.nextBits(33)); @@ -86,7 +85,7 @@ public class CachedRandomBitsTest { assertEquals(0x4, arb.nextBits(6)); - assertEquals(0x40000000 | (0x12345600 >> 2) | 0x38, arb.nextBits(32)); + assertEquals(0x40000000 | 0x12345600 >> 2 | 0x38, arb.nextBits(32)); assertEquals(1, arb.nextBits(1)); assertEquals(0, arb.nextBits(1));