Skip to content

Commit 45659e4

Browse files
committed
Make private static classes final
1 parent e383803 commit 45659e4

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/org/apache/commons/codec/digest/Blake3.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ private static int[] parentChainingValue(
365365
* Represents the state just prior to either producing an eight word chaining value or any number of output bytes
366366
* when the ROOT flag is set.
367367
*/
368-
private static class Output {
368+
private static final class Output {
369369
private final int[] inputChainingValue;
370370
private final int[] blockWords;
371371
private final long counter;
@@ -405,7 +405,7 @@ private void rootOutputBytes(final byte[] out, int offset, int length) {
405405
}
406406
}
407407

408-
private static class ChunkState {
408+
private static final class ChunkState {
409409
private int[] chainingValue;
410410
private final long chunkCounter;
411411
private final int flags;
@@ -458,7 +458,7 @@ private Output output() {
458458
}
459459
}
460460

461-
private static class EngineState {
461+
private static final class EngineState {
462462
private final int[] key;
463463
private final int flags;
464464
// Space for 54 subtree chaining values: 2^54 * CHUNK_LEN = 2^64

src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public void testEnsureBufferSizeThrowsOnOverflow() {
379379
* Extend BaseNCodec without implementation (no operations = NoOp).
380380
* Used for testing the memory allocation in {@link BaseNCodec#ensureBufferSize(int, Context)}.
381381
*/
382-
private static class NoOpBaseNCodec extends BaseNCodec {
382+
private static final class NoOpBaseNCodec extends BaseNCodec {
383383
NoOpBaseNCodec() {
384384
super(0, 0, 0, 0);
385385
}

src/test/java/org/apache/commons/codec/digest/PureJavaCrc32Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public void run() {
362362
return new BenchResult(expected, sum/results.length);
363363
}
364364

365-
private static class BenchResult {
365+
private static final class BenchResult {
366366
/** CRC value */
367367
final long value;
368368
/** Speed (MB per second) */

0 commit comments

Comments
 (0)