You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/12/08 16:53:02 UTC

[commons-compress] branch master updated: Use simpler array declarations

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-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a42dc8d Use simpler array declarations
9a42dc8d is described below

commit 9a42dc8dd231db2b31d0a6f156c91514c0d4e147
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Dec 8 11:32:08 2022 -0500

    Use simpler array declarations
    
    Remove trailing whitespace
    Use final parameters
    Use Integer cache
    Use enhanced for loop
    Better use of Collections API
    Make inner class static
    Remove unused imports
    Use Long cache
    Use Double cache
    Use try-with-resources
---
 .../compress/archivers/arj/ArjArchiveEntry.java    |   2 -
 .../compress/harmony/unpack200/ClassBands.java     |  22 +-
 .../apache/commons/compress/ArchiveUtilsTest.java  |   2 +-
 .../archivers/dump/DumpArchiveInputStreamTest.java |   2 +-
 .../compress/archivers/jar/ExpandApkTest.java      |   2 +-
 .../compress/archivers/sevenz/SevenZFileTest.java  |  10 +-
 .../archivers/sevenz/SevenZNativeHeapTest.java     |   4 +-
 .../archivers/tar/TarArchiveInputStreamTest.java   |   8 +-
 .../archivers/tar/TarArchiveOutputStreamTest.java  |   8 +-
 .../compress/archivers/tar/TarUtilsTest.java       |  12 +-
 .../archivers/zip/GeneralPurposeBitTest.java       |   8 +-
 .../archivers/zip/StreamCompressorTest.java        |   2 +-
 .../archivers/zip/X5455_ExtendedTimestampTest.java |   2 +-
 .../archivers/zip/ZipArchiveEntryTest.java         |   2 +-
 .../archivers/zip/ZipArchiveInputStreamTest.java   |   8 +-
 .../archivers/zip/ZipEightByteIntegerTest.java     |   6 +-
 .../compress/archivers/zip/ZipEncodingTest.java    |  94 ++++-----
 .../compress/archivers/zip/ZipFileTest.java        |   2 +-
 .../compress/archivers/zip/ZipLongTest.java        |   4 +-
 .../archivers/zip/ZipMemoryFileSystemTest.java     |   6 +-
 .../compress/archivers/zip/ZipShortTest.java       |   4 +-
 .../lz4/BlockLZ4CompressorOutputStreamTest.java    |  12 +-
 .../lz4/FramedLZ4CompressorInputStreamTest.java    |  40 ++--
 .../AbstractLZ77CompressorInputStreamTest.java     |  10 +-
 .../FramedSnappyCompressorInputStreamTest.java     |   2 +-
 .../harmony/pack200/tests/ArchiveTest.java         |   4 +-
 .../harmony/pack200/tests/BHSDCodecTest.java       |   2 +-
 .../harmony/pack200/tests/CodecEncodingTest.java   | 234 ++++++++++-----------
 .../compress/harmony/pack200/tests/CodecTest.java  |   2 +-
 .../compress/harmony/pack200/tests/HelloWorld.java |   4 +-
 .../pack200/tests/NewAttributeBandsTest.java       |   8 +-
 .../harmony/pack200/tests/PackingOptionsTest.java  |   4 +-
 .../harmony/pack200/tests/PopulationCodecTest.java |   2 +-
 .../harmony/pack200/tests/RunCodecTest.java        |   6 +-
 .../unpack200/tests/AbstractBandsTestCase.java     |   4 +-
 .../unpack200/tests/AttributeLayoutTest.java       |   8 +-
 .../harmony/unpack200/tests/BandSetTest.java       |   4 +-
 .../harmony/unpack200/tests/BcBandsTest.java       |  76 +++----
 .../harmony/unpack200/tests/ClassBandsTest.java    |   8 +-
 .../harmony/unpack200/tests/CodeAttributeTest.java |  22 +-
 .../Codec_decodeInts_OutOfMemoryErrorTest.java     |   2 +-
 .../unpack200/tests/NewAttributeBandsTest.java     |   6 +-
 .../unpack200/tests/SegmentConstantPoolTest.java   |  14 +-
 .../unpack200/tests/SegmentOptionsTest.java        |   2 +-
 .../harmony/unpack200/tests/SegmentUtilsTest.java  |   6 +-
 .../commons/compress/utils/ByteUtilsTest.java      |   8 +-
 46 files changed, 345 insertions(+), 355 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
index e9b9fa7f..165e4855 100644
--- a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
@@ -19,8 +19,6 @@ package org.apache.commons.compress.archivers.arj;
 
 import java.io.File;
 import java.util.Date;
-import java.util.regex.Matcher;
-
 import org.apache.commons.compress.archivers.ArchiveEntry;
 import org.apache.commons.compress.archivers.zip.ZipUtil;
 
diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/ClassBands.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/ClassBands.java
index 8ed828ea..03ce4feb 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/ClassBands.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/ClassBands.java
@@ -401,16 +401,15 @@ public class ClassBands extends BandSet {
     private int getCallCount(final int[][] methodAttrIndexes, final long[][] flags, final int context) {
         int callCount = 0;
         for (int[] element : methodAttrIndexes) {
-            for (int j = 0; j < element.length; j++) {
-                final int index = element[j];
+            for (final int index : element) {
                 final AttributeLayout layout = attrMap.getAttributeLayout(index, context);
                 callCount += layout.numBackwardsCallables();
             }
         }
         int layoutsUsed = 0;
         for (long[] flag : flags) {
-            for (int j = 0; j < flag.length; j++) {
-                layoutsUsed |= flag[j];
+            for (long element : flag) {
+                layoutsUsed |= element;
             }
         }
         for (int i = 0; i < 26; i++) {
@@ -470,8 +469,8 @@ public class ClassBands extends BandSet {
             classInnerClassesN);
         int flagsCount = 0;
         for (int[] element : classInnerClassesF) {
-            for (int j = 0; j < element.length; j++) {
-                if (element[j] != 0) {
+            for (int element2 : element) {
+                if (element2 != 0) {
                     flagsCount++;
                 }
             }
@@ -713,8 +712,7 @@ public class ClassBands extends BandSet {
         final int[][] codeAttrIndexes = decodeBandInt("code_attr_indexes", in, Codec.UNSIGNED5, codeAttrCounts);
         int callCount = 0;
         for (int[] element : codeAttrIndexes) {
-            for (int j = 0; j < element.length; j++) {
-                final int index = element[j];
+            for (final int index : element) {
                 final AttributeLayout layout = attrMap.getAttributeLayout(index, AttributeLayout.CONTEXT_CODE);
                 callCount += layout.numBackwardsCallables();
             }
@@ -889,8 +887,8 @@ public class ClassBands extends BandSet {
                     mbg[i].anno_N);
                 mbg[i].pair_N = decodeBandInt(contextName + "_" + rxa + "_pair_N", in, Codec.UNSIGNED5, mbg[i].anno_N);
                 for (int[] element : mbg[i].pair_N) {
-                    for (int k = 0; k < element.length; k++) {
-                        pairCount += element[k];
+                    for (int element2 : element) {
+                        pairCount += element2;
                     }
                 }
 
@@ -1161,9 +1159,7 @@ public class ClassBands extends BandSet {
         final ArrayList<List<Attribute>> orderedAttributeList = new ArrayList<>(codeAttributes.length);
         for (List<Attribute> codeAttribute : codeAttributes) {
             final List<Attribute> currentAttributes = new ArrayList<>(codeAttribute.size());
-            for (int attributeIndex = 0; attributeIndex < codeAttribute.size(); attributeIndex++) {
-                currentAttributes.add(codeAttribute.get(attributeIndex));
-            }
+            currentAttributes.addAll(codeAttribute);
             orderedAttributeList.add(currentAttributes);
         }
         return orderedAttributeList;
diff --git a/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java b/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java
index c2e38e43..b3048eec 100644
--- a/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java
@@ -33,7 +33,7 @@ public class ArchiveUtilsTest extends AbstractTestCase {
 
     private static final int bytesToTest = 50;
     private static final byte[] byteTest = new byte[bytesToTest];
-    
+
     static {
         for (int i = 0; i < byteTest.length;) {
             byteTest[i] = (byte) i;
diff --git a/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
index 0a9bee10..e02f8544 100644
--- a/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
@@ -64,7 +64,7 @@ public class DumpArchiveInputStreamTest extends AbstractTestCase {
         while (dump.getNextDumpEntry() != null) {
             // just consume the archive
         }
-        final byte[] expected = new byte[] {
+        final byte[] expected = {
             'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\n'
         };
         final byte[] actual = new byte[expected.length];
diff --git a/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java b/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java
index 1353041e..c4d2a50e 100644
--- a/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java
@@ -39,7 +39,7 @@ public class ExpandApkTest {
             .forEach(path -> new Expander().expand(ArchiveStreamFactory.APK, println(path), null));
     }
 
-    private <T> T println(T object) {
+    private <T> T println(final T object) {
         // System.out.println(object);
         return object;
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
index 1c605bbb..839de985 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
@@ -40,8 +40,6 @@ import java.security.NoSuchAlgorithmException;
 import java.time.Instant;
 import java.util.*;
 import java.util.function.Function;
-import java.util.function.Supplier;
-
 import javax.crypto.Cipher;
 
 import org.apache.commons.compress.AbstractTestCase;
@@ -174,7 +172,7 @@ public class SevenZFileTest extends AbstractTestCase {
         test7zUnarchive(f, m, false);
     }
 
-    private void test7zUnarchive(final File f, final SevenZMethod m, boolean tryToRecoverBrokenArchives)
+    private void test7zUnarchive(final File f, final SevenZMethod m, final boolean tryToRecoverBrokenArchives)
         throws Exception {
         test7zUnarchive(f, m, (char[]) null, tryToRecoverBrokenArchives);
     }
@@ -862,7 +860,7 @@ public class SevenZFileTest extends AbstractTestCase {
         return Cipher.getMaxAllowedKeyLength("AES/ECB/PKCS5Padding") >= 256;
     }
 
-    private void assertDates(SevenZArchiveEntry entry, String modified, String access, String creation) {
+    private void assertDates(final SevenZArchiveEntry entry, final String modified, final String access, final String creation) {
         assertDate(entry, modified, SevenZArchiveEntry::getHasLastModifiedDate,
             SevenZArchiveEntry::getLastModifiedTime, SevenZArchiveEntry::getLastModifiedDate);
         assertDate(entry, access, SevenZArchiveEntry::getHasAccessDate,
@@ -871,8 +869,8 @@ public class SevenZFileTest extends AbstractTestCase {
             SevenZArchiveEntry::getCreationTime, SevenZArchiveEntry::getCreationDate);
     }
 
-    private void assertDate(SevenZArchiveEntry entry, String value, Function<SevenZArchiveEntry, Boolean> hasValue,
-        Function<SevenZArchiveEntry, FileTime> timeFunction, Function<SevenZArchiveEntry, Date> dateFunction) {
+    private void assertDate(final SevenZArchiveEntry entry, final String value, final Function<SevenZArchiveEntry, Boolean> hasValue,
+        final Function<SevenZArchiveEntry, FileTime> timeFunction, final Function<SevenZArchiveEntry, Date> dateFunction) {
         if (value != null) {
             assertTrue(hasValue.apply(entry));
             final Instant parsedInstant = Instant.parse(value);
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java
index 77dd1980..fbe6cf99 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java
@@ -61,7 +61,7 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
         assertTrue(delegatingInflater.isEnded.get());
     }
 
-    private class DelegatingInflater extends Inflater {
+    private static class DelegatingInflater extends Inflater {
 
         private final Inflater inflater;
 
@@ -158,7 +158,7 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
 
     }
 
-    private class DelegatingDeflater extends Deflater {
+    private static class DelegatingDeflater extends Deflater {
 
         private final Deflater deflater;
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
index d94267b2..7120ea5c 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
@@ -134,7 +134,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
         while (tar.getNextTarEntry() != null) {
             // just consume the archive
         }
-        final byte[] expected = new byte[] {
+        final byte[] expected = {
             'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\n'
         };
         final byte[] actual = new byte[expected.length];
@@ -165,8 +165,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
     @Test
     public void shouldThrowAnExceptionOnTruncatedEntries() throws Exception {
         final File dir = mkdir("COMPRESS-279");
-        final TarArchiveInputStream is = getTestStream("/COMPRESS-279.tar");
-        try {
+        try (TarArchiveInputStream is = getTestStream("/COMPRESS-279.tar")) {
             assertThrows(IOException.class, () -> {
                 TarArchiveEntry entry = is.getNextTarEntry();
                 int count = 0;
@@ -179,7 +178,6 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
                 }
             });
         } finally {
-            is.close();
             rmdir(dir);
         }
     }
@@ -375,7 +373,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
         }
     }
 
-    private void getNextEntryUntilIOException(TarArchiveInputStream archive) {
+    private void getNextEntryUntilIOException(final TarArchiveInputStream archive) {
         assertThrows(IOException.class, () -> {
             while (archive.getNextTarEntry() != null) {
                 // noop
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
index 4a95b898..6a46becb 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
@@ -661,11 +661,11 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
         testPadding(-2, fileName, contents);    // don't specify a block size -> use minimum length
 
         // don't specify a block size -> use minimum length
-        assertThrows(IllegalArgumentException.class, () -> testPadding(511, fileName, contents));    
-            
+        assertThrows(IllegalArgumentException.class, () -> testPadding(511, fileName, contents));
+
         // don't specify a block size -> use minimum length
-        assertThrows(IllegalArgumentException.class, () -> testPadding(0, fileName, contents));    
-        
+        assertThrows(IllegalArgumentException.class, () -> testPadding(0, fileName, contents));
+
         // test with "content" that is an exact multiple of record length
         byte[] contents2 = new byte[2048];
         java.util.Arrays.fill(contents2, (byte) 42);
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
index 869f8176..d453f1e9 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
@@ -243,7 +243,7 @@ public class TarUtilsTest {
 
     @Test
     public void testReadNegativeBinary8Byte() {
-        final byte[] b = new byte[] {
+        final byte[] b = {
             (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
             (byte) 0xff, (byte) 0xff, (byte) 0xf1, (byte) 0xef,
         };
@@ -252,7 +252,7 @@ public class TarUtilsTest {
 
     @Test
     public void testReadNegativeBinary12Byte() {
-        final byte[] b = new byte[] {
+        final byte[] b = {
             (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
             (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
             (byte) 0xff, (byte) 0xff, (byte) 0xf1, (byte) 0xef,
@@ -263,7 +263,7 @@ public class TarUtilsTest {
 
     @Test
     public void testWriteNegativeBinary8Byte() {
-        final byte[] b = new byte[] {
+        final byte[] b = {
             (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
             (byte) 0xff, (byte) 0xff, (byte) 0xf1, (byte) 0xef,
         };
@@ -379,7 +379,7 @@ public class TarUtilsTest {
     @Test
     public void testParseOctalCompress330() {
         final long expected = 0100000;
-        final byte [] buffer = new byte[] {
+        final byte [] buffer = {
             32, 32, 32, 32, 32, 49, 48, 48, 48, 48, 48, 32
         };
         assertEquals(expected, TarUtils.parseOctalOrBinary(buffer, 0, buffer.length));
@@ -399,7 +399,7 @@ public class TarUtilsTest {
     public void testParseSparse() {
         final long expectedOffset = 0100000;
         final long expectedNumbytes = 0111000;
-        final byte [] buffer = new byte[] {
+        final byte [] buffer = {
                 ' ', ' ', ' ', ' ', ' ', '0', '1', '0', '0', '0', '0', '0', // sparseOffset
                 ' ', ' ', ' ', ' ', ' ', '0', '1', '1', '1', '0', '0', '0'};
         final TarArchiveStructSparse sparse = TarUtils.parseSparse(buffer, 0);
@@ -454,7 +454,7 @@ public class TarUtilsTest {
 
     @Test
     public void testParseTarWithSpecialPaxHeaders() throws IOException {
-        try (InputStream in = Files.newInputStream(getFile("COMPRESS-530.tar").toPath()); 
+        try (InputStream in = Files.newInputStream(getFile("COMPRESS-530.tar").toPath());
              TarArchiveInputStream archive = new TarArchiveInputStream(in)) {
             assertThrows(IOException.class, () -> archive.getNextEntry());
             // IOUtils.toByteArray(archive);
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBitTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBitTest.java
index be33f261..1c87f039 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBitTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBitTest.java
@@ -65,7 +65,7 @@ public class GeneralPurposeBitTest {
 
     @Test
     public void testDataDescriptor() {
-        final byte[] flags = new byte[] {(byte) 8, (byte) 0};
+        final byte[] flags = {(byte) 8, (byte) 0};
         assertTrue(GeneralPurposeBit.parse(flags, 0).usesDataDescriptor());
         final GeneralPurposeBit b = new GeneralPurposeBit();
         b.useDataDescriptor(true);
@@ -74,7 +74,7 @@ public class GeneralPurposeBitTest {
 
     @Test
     public void testLanguageEncodingFlag() {
-        final byte[] flags = new byte[] {(byte) 0, (byte) 8};
+        final byte[] flags = {(byte) 0, (byte) 8};
         assertTrue(GeneralPurposeBit.parse(flags, 0).usesUTF8ForNames());
         final GeneralPurposeBit b = new GeneralPurposeBit();
         b.useUTF8ForNames(true);
@@ -83,7 +83,7 @@ public class GeneralPurposeBitTest {
 
     @Test
     public void testEncryption() {
-        final byte[] flags = new byte[] {(byte) 1, (byte) 0};
+        final byte[] flags = {(byte) 1, (byte) 0};
         assertTrue(GeneralPurposeBit.parse(flags, 0).usesEncryption());
         final GeneralPurposeBit b = new GeneralPurposeBit();
         b.useEncryption(true);
@@ -92,7 +92,7 @@ public class GeneralPurposeBitTest {
 
     @Test
     public void testStrongEncryption() {
-        byte[] flags = new byte[] {(byte) 65, (byte) 0};
+        byte[] flags = {(byte) 65, (byte) 0};
         assertTrue(GeneralPurposeBit.parse(flags, 0).usesStrongEncryption());
         final GeneralPurposeBit b = new GeneralPurposeBit();
         b.useStrongEncryption(true);
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java
index 40bf2658..5c56f712 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java
@@ -56,7 +56,7 @@ public class StreamCompressorTest {
         assertEquals(3299542, sc.getCrc32());
 
         final byte[] actuals = baos.toByteArray();
-        final byte[] expected = new byte[]{115,116,4,1,39,48,0,0};
+        final byte[] expected = {115,116,4,1,39,48,0,0};
         // Note that this test really asserts stuff about the java Deflater, which might be a little bit brittle
         assertArrayEquals(expected, actuals);
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
index bdd54b3a..bc365fb3 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
@@ -461,7 +461,7 @@ public class X5455_ExtendedTimestampTest {
 
     @Test
     public void resetsFlagsWhenLocalFileArrayIsTooShort() throws Exception {
-        final byte[] local = new byte[] {
+        final byte[] local = {
             7
         }; // claims all three time values would be present, but they are not
         xf.parseFromLocalFileData(local, 0, 1);
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
index 7c47eb32..303b2e60 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
@@ -359,7 +359,7 @@ public class ZipArchiveEntryTest {
         u.setHeaderId(ExtraFieldUtilsTest.UNRECOGNIZED_HEADER);
         u.setLocalFileDataData(ByteUtils.EMPTY_BYTE_ARRAY);
         final UnparseableExtraFieldData x = new UnparseableExtraFieldData();
-        final byte[] unparseable = new byte[] {
+        final byte[] unparseable = {
             0, 0, (byte) 0xff, (byte) 0xff, 0, 0, 0
         };
         x.parseFromLocalFileData(unparseable, 0, unparseable.length);
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
index 740a984c..352f999d 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
@@ -98,7 +98,7 @@ public class ZipArchiveInputStreamTest {
             .getResourceAsStream("/archive_with_trailer.zip");
         final ZipArchiveInputStream zip = new ZipArchiveInputStream(is);
         getAllZipEntries(zip);
-        final byte[] expected = new byte[] {
+        final byte[] expected = {
             'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\n'
         };
         final byte[] actual = new byte[expected.length];
@@ -228,7 +228,7 @@ public class ZipArchiveInputStreamTest {
             assertEquals(-1, e.getSize());
             assertEquals(ZipMethod.ENHANCED_DEFLATED.getCode(), e.getMethod());
             final byte[] fromZip = IOUtils.toByteArray(zin);
-            final byte[] expected = new byte[] {
+            final byte[] expected = {
                 'M', 'a', 'n', 'i', 'f', 'e', 's', 't', '-', 'V', 'e', 'r', 's', 'i', 'o', 'n', ':', ' ', '1', '.', '0',
                 '\r', '\n', '\r', '\n'
             };
@@ -657,7 +657,7 @@ public class ZipArchiveInputStreamTest {
      */
     @Test
     public void throwsIfZip64ExtraCouldNotBeUnderstood() {
-        assertThrows(IOException.class, () -> 
+        assertThrows(IOException.class, () ->
         fuzzingTest(new int[] {
             0x50, 0x4b, 0x03, 0x04, 0x2e, 0x00, 0x00, 0x00, 0x0c, 0x00,
             0x84, 0xb6, 0xba, 0x46, 0x72, 0xb6, 0xfe, 0x77, 0x63, 0x00,
@@ -689,7 +689,7 @@ public class ZipArchiveInputStreamTest {
         }
     }
 
-    private void getAllZipEntries(ZipArchiveInputStream zipInputStream) throws IOException {
+    private void getAllZipEntries(final ZipArchiveInputStream zipInputStream) throws IOException {
         while (zipInputStream.getNextZipEntry() != null) {
             // noop
         }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
index 2b077d7c..5811c83c 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
@@ -54,7 +54,7 @@ public class ZipEightByteIntegerTest {
      */
     @Test
     public void testLongFromBytes() {
-        final byte[] val = new byte[] {0x78, 0x56, 0x34, 0x12, (byte) 0xAB, 0x00, 0x00, 0x00};
+        final byte[] val = {0x78, 0x56, 0x34, 0x12, (byte) 0xAB, 0x00, 0x00, 0x00};
         final ZipEightByteInteger zl = new ZipEightByteInteger(val);
         assertEquals("longValue from bytes", 0xAB12345678L, zl.getLongValue());
     }
@@ -84,7 +84,7 @@ public class ZipEightByteIntegerTest {
      */
     @Test
     public void testBIFromBytes() {
-        final byte[] val = new byte[] {(byte) 0xFE, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
+        final byte[] val = {(byte) 0xFE, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
         final ZipEightByteInteger zl = new ZipEightByteInteger(val);
         assertEquals("value from bytes",
                      BigInteger.valueOf(Long.MAX_VALUE).shiftLeft(1),
@@ -108,7 +108,7 @@ public class ZipEightByteIntegerTest {
         assertEquals("symmetric", zl2, zl);
 
         assertNotEquals("null handling", null, zl);
-        assertNotEquals("non ZipEightByteInteger handling", zl, new Integer(0x1234));
+        assertNotEquals("non ZipEightByteInteger handling", zl, Integer.valueOf(0x1234));
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java
index 25a926d0..26e53ec3 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java
@@ -103,53 +103,53 @@ public class ZipEncodingTest {
         // retrieved by
         //    awk '/^0x/ && NF>2 {print $1;}' CP1252.TXT
         final byte[] b =
-            new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                         0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
-                         0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-                         0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
-                         0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
-                         0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
-                         0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-                         0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
-                         0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
-                         0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
-                         0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
-                         0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
-                         0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
-                         0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
-                         0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
-                         0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
-                         (byte) 0x80, (byte) 0x82, (byte) 0x83, (byte) 0x84,
-                         (byte) 0x85, (byte) 0x86, (byte) 0x87, (byte) 0x88,
-                         (byte) 0x89, (byte) 0x8A, (byte) 0x8B, (byte) 0x8C,
-                         (byte) 0x8E, (byte) 0x91, (byte) 0x92, (byte) 0x93,
-                         (byte) 0x94, (byte) 0x95, (byte) 0x96, (byte) 0x97,
-                         (byte) 0x98, (byte) 0x99, (byte) 0x9A, (byte) 0x9B,
-                         (byte) 0x9C, (byte) 0x9E, (byte) 0x9F, (byte) 0xA0,
-                         (byte) 0xA1, (byte) 0xA2, (byte) 0xA3, (byte) 0xA4,
-                         (byte) 0xA5, (byte) 0xA6, (byte) 0xA7, (byte) 0xA8,
-                         (byte) 0xA9, (byte) 0xAA, (byte) 0xAB, (byte) 0xAC,
-                         (byte) 0xAD, (byte) 0xAE, (byte) 0xAF, (byte) 0xB0,
-                         (byte) 0xB1, (byte) 0xB2, (byte) 0xB3, (byte) 0xB4,
-                         (byte) 0xB5, (byte) 0xB6, (byte) 0xB7, (byte) 0xB8,
-                         (byte) 0xB9, (byte) 0xBA, (byte) 0xBB, (byte) 0xBC,
-                         (byte) 0xBD, (byte) 0xBE, (byte) 0xBF, (byte) 0xC0,
-                         (byte) 0xC1, (byte) 0xC2, (byte) 0xC3, (byte) 0xC4,
-                         (byte) 0xC5, (byte) 0xC6, (byte) 0xC7, (byte) 0xC8,
-                         (byte) 0xC9, (byte) 0xCA, (byte) 0xCB, (byte) 0xCC,
-                         (byte) 0xCD, (byte) 0xCE, (byte) 0xCF, (byte) 0xD0,
-                         (byte) 0xD1, (byte) 0xD2, (byte) 0xD3, (byte) 0xD4,
-                         (byte) 0xD5, (byte) 0xD6, (byte) 0xD7, (byte) 0xD8,
-                         (byte) 0xD9, (byte) 0xDA, (byte) 0xDB, (byte) 0xDC,
-                         (byte) 0xDD, (byte) 0xDE, (byte) 0xDF, (byte) 0xE0,
-                         (byte) 0xE1, (byte) 0xE2, (byte) 0xE3, (byte) 0xE4,
-                         (byte) 0xE5, (byte) 0xE6, (byte) 0xE7, (byte) 0xE8,
-                         (byte) 0xE9, (byte) 0xEA, (byte) 0xEB, (byte) 0xEC,
-                         (byte) 0xED, (byte) 0xEE, (byte) 0xEF, (byte) 0xF0,
-                         (byte) 0xF1, (byte) 0xF2, (byte) 0xF3, (byte) 0xF4,
-                         (byte) 0xF5, (byte) 0xF6, (byte) 0xF7, (byte) 0xF8,
-                         (byte) 0xF9, (byte) 0xFA, (byte) 0xFB, (byte) 0xFC,
-                         (byte) 0xFD, (byte) 0xFE, (byte) 0xFF };
+            { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                     0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+                     0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                     0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
+                     0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+                     0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
+                     0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+                     0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
+                     0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+                     0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
+                     0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
+                     0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
+                     0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+                     0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+                     0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+                     0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
+                     (byte) 0x80, (byte) 0x82, (byte) 0x83, (byte) 0x84,
+                     (byte) 0x85, (byte) 0x86, (byte) 0x87, (byte) 0x88,
+                     (byte) 0x89, (byte) 0x8A, (byte) 0x8B, (byte) 0x8C,
+                     (byte) 0x8E, (byte) 0x91, (byte) 0x92, (byte) 0x93,
+                     (byte) 0x94, (byte) 0x95, (byte) 0x96, (byte) 0x97,
+                     (byte) 0x98, (byte) 0x99, (byte) 0x9A, (byte) 0x9B,
+                     (byte) 0x9C, (byte) 0x9E, (byte) 0x9F, (byte) 0xA0,
+                     (byte) 0xA1, (byte) 0xA2, (byte) 0xA3, (byte) 0xA4,
+                     (byte) 0xA5, (byte) 0xA6, (byte) 0xA7, (byte) 0xA8,
+                     (byte) 0xA9, (byte) 0xAA, (byte) 0xAB, (byte) 0xAC,
+                     (byte) 0xAD, (byte) 0xAE, (byte) 0xAF, (byte) 0xB0,
+                     (byte) 0xB1, (byte) 0xB2, (byte) 0xB3, (byte) 0xB4,
+                     (byte) 0xB5, (byte) 0xB6, (byte) 0xB7, (byte) 0xB8,
+                     (byte) 0xB9, (byte) 0xBA, (byte) 0xBB, (byte) 0xBC,
+                     (byte) 0xBD, (byte) 0xBE, (byte) 0xBF, (byte) 0xC0,
+                     (byte) 0xC1, (byte) 0xC2, (byte) 0xC3, (byte) 0xC4,
+                     (byte) 0xC5, (byte) 0xC6, (byte) 0xC7, (byte) 0xC8,
+                     (byte) 0xC9, (byte) 0xCA, (byte) 0xCB, (byte) 0xCC,
+                     (byte) 0xCD, (byte) 0xCE, (byte) 0xCF, (byte) 0xD0,
+                     (byte) 0xD1, (byte) 0xD2, (byte) 0xD3, (byte) 0xD4,
+                     (byte) 0xD5, (byte) 0xD6, (byte) 0xD7, (byte) 0xD8,
+                     (byte) 0xD9, (byte) 0xDA, (byte) 0xDB, (byte) 0xDC,
+                     (byte) 0xDD, (byte) 0xDE, (byte) 0xDF, (byte) 0xE0,
+                     (byte) 0xE1, (byte) 0xE2, (byte) 0xE3, (byte) 0xE4,
+                     (byte) 0xE5, (byte) 0xE6, (byte) 0xE7, (byte) 0xE8,
+                     (byte) 0xE9, (byte) 0xEA, (byte) 0xEB, (byte) 0xEC,
+                     (byte) 0xED, (byte) 0xEE, (byte) 0xEF, (byte) 0xF0,
+                     (byte) 0xF1, (byte) 0xF2, (byte) 0xF3, (byte) 0xF4,
+                     (byte) 0xF5, (byte) 0xF6, (byte) 0xF7, (byte) 0xF8,
+                     (byte) 0xF9, (byte) 0xFA, (byte) 0xFB, (byte) 0xFC,
+                     (byte) 0xFD, (byte) 0xFE, (byte) 0xFF };
 
         doSimpleEncodingTest("Cp1252",b);
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
index eed9e9eb..7b98db2f 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
@@ -778,7 +778,7 @@ public class ZipFileTest {
         final File extractedFile = new File(testZip.getParentFile(), testEntryName);
         extractedFile.deleteOnExit();
 
-        final byte[] testData = new byte[]{1, 2, 3, 4};
+        final byte[] testData = {1, 2, 3, 4};
         final byte[] buffer = new byte[512];
         int bytesRead;
         try (InputStream unzipsfxInputStream = Files.newInputStream(unzipsfx.toPath())) {
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
index d0540bdb..b1d4d0d9 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
@@ -62,7 +62,7 @@ public class ZipLongTest {
      */
     @Test
     public void testFromBytes() {
-        final byte[] val = new byte[] {0x78, 0x56, 0x34, 0x12};
+        final byte[] val = {0x78, 0x56, 0x34, 0x12};
         final ZipLong zl = new ZipLong(val);
         assertEquals("value from bytes", 0x12345678, zl.getValue());
     }
@@ -84,7 +84,7 @@ public class ZipLongTest {
         assertEquals("symmetric", zl2, zl);
 
         assertNotEquals("null handling", null, zl);
-        assertNotEquals("non ZipLong handling", zl, new Integer(0x1234));
+        assertNotEquals("non ZipLong handling", zl, Integer.valueOf(0x1234));
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipMemoryFileSystemTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipMemoryFileSystemTest.java
index ac969621..c5c65294 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipMemoryFileSystemTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipMemoryFileSystemTest.java
@@ -59,11 +59,11 @@ import org.junit.jupiter.api.Test;
 import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder;
 
 public class ZipMemoryFileSystemTest {
-    
-    static void println(String x) {
+
+    static void println(final String x) {
         // System.out.println(x);
     }
-    
+
     private Path dir;
 
     @BeforeEach
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
index 29c5ca08..82b6e27b 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
@@ -60,7 +60,7 @@ public class ZipShortTest {
      */
     @Test
     public void testFromBytes() {
-        final byte[] val = new byte[] {0x34, 0x12};
+        final byte[] val = {0x34, 0x12};
         final ZipShort zs = new ZipShort(val);
         assertEquals("value from bytes", 0x1234, zs.getValue());
     }
@@ -82,7 +82,7 @@ public class ZipShortTest {
         assertEquals("symmetric", zs2, zs);
 
         assertNotEquals("null handling", null, zs);
-        assertNotEquals("non ZipShort handling", zs, new Integer(0x1234));
+        assertNotEquals("non ZipShort handling", zs, Integer.valueOf(0x1234));
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java
index f9e7a444..cec042e4 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java
@@ -81,7 +81,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     public void pairAccumulatesLengths() {
         final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 4));
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final byte[] b = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 1, 4));
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 2, 5));
         Assert.assertEquals(13, p.length());
@@ -126,7 +126,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     public void canWritePairWithoutBackReference() throws IOException {
         final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final byte[] b = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 1, 4));
         final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
@@ -136,7 +136,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     public void writesCorrectSizeFor15ByteLengthLiteral() throws IOException {
         final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final byte[] b = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 9));
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 6));
         final ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -148,7 +148,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     public void writesCorrectSizeFor269ByteLengthLiteral() throws IOException {
         final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+        final byte[] b = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         for (int i = 0; i < 26; i++) {
             p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 10));
         }
@@ -162,7 +162,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     public void writesCorrectSizeFor270ByteLengthLiteral() throws IOException {
         final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+        final byte[] b = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         for (int i = 0; i < 27; i++) {
             p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 10));
         }
@@ -175,7 +175,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     public void writesCompletePair() throws IOException {
         final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final byte[] b = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 1, 4));
         b[2] = 19;
         p.setBackReference(new LZ77Compressor.BackReference(1, 5));
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
index c9b1f6c1..cf83c253 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
@@ -158,7 +158,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsFileWithoutFrameDescriptor() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18 // signature
         };
         try {
@@ -172,7 +172,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsFileWithoutBlockSizeByte() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
         };
@@ -187,7 +187,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsFileWithWrongVersion() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x24, // flag - Version 00, block independent, no block checksum, no content size, with content checksum
         };
@@ -202,7 +202,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsFileWithInsufficientContentSize() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x6C, // flag - Version 01, block independent, no block checksum, with content size, with content checksum
             0x70, // block size 4MB
@@ -218,7 +218,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsFileWithoutHeaderChecksum() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -234,7 +234,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsFileWithBadHeaderChecksum() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -251,7 +251,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void readsUncompressedBlocks() throws IOException {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -270,7 +270,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void readsUncompressedBlocksUsingSingleByteRead() throws IOException {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -287,7 +287,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsBlocksWithoutChecksum() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x70, // flag - Version 01, block independent, with block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -307,7 +307,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsStreamsWithoutContentChecksum() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -328,7 +328,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsStreamsWithBadContentChecksum() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -350,7 +350,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void skipsOverSkippableFrames() throws IOException {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -379,7 +379,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void skipsOverTrailingSkippableFrames() throws IOException {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -401,7 +401,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsSkippableFrameFollowedByJunk() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -426,7 +426,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsSkippableFrameFollowedByTooFewBytes() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -451,7 +451,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsSkippableFrameWithPrematureEnd() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -475,7 +475,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsSkippableFrameWithPrematureEndInLengthBytes() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -498,7 +498,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsSkippableFrameWithBadSignatureTrailer() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -520,7 +520,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsSkippableFrameWithBadSignaturePrefix() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -542,7 +542,7 @@ public final class FramedLZ4CompressorInputStreamTest extends AbstractTestCase {
 
     @Test
     public void rejectsTrailingBytesAfterValidFrame() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
index 84e36639..72f2bf71 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStreamTest.java
@@ -32,12 +32,12 @@ import org.junit.jupiter.api.Test;
 public class AbstractLZ77CompressorInputStreamTest {
 
     private static class TestStream extends AbstractLZ77CompressorInputStream {
-        
+
         private boolean literal;
         TestStream(final InputStream in) throws IOException {
             super(in, 1024);
         }
-        
+
         @Override
         public int read(final byte[] b, final int off, final int len) throws IOException {
             if (literal) {
@@ -45,7 +45,7 @@ public class AbstractLZ77CompressorInputStreamTest {
             }
             return readBackReference(b, off, len);
         }
-        
+
         void literal(final int len) {
             startLiteral(len);
             literal = true;
@@ -54,7 +54,7 @@ public class AbstractLZ77CompressorInputStreamTest {
 
     @Test
     public void cantPrefillAfterDataHasBeenRead() throws IOException {
-        final byte[] data = new byte[] {1, 2, 3, 4};
+        final byte[] data = {1, 2, 3, 4};
         try (TestStream s = new TestStream(new ByteArrayInputStream(data))) {
             s.literal(3);
             assertEquals(1, s.read());
@@ -64,7 +64,7 @@ public class AbstractLZ77CompressorInputStreamTest {
 
     @Test
     public void prefillCanBeUsedForBackReferences() throws IOException {
-        final byte[] data = new byte[] { 1, 2, 3, 4 };
+        final byte[] data = { 1, 2, 3, 4 };
         try (TestStream s = new TestStream(new ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY))) {
             s.prefill(data);
             s.startBackReference(2, 4);
diff --git a/src/test/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorInputStreamTest.java
index b831d1e5..2a96ba6c 100644
--- a/src/test/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorInputStreamTest.java
@@ -130,7 +130,7 @@ public final class FramedSnappyCompressorInputStreamTest
 
     @Test
     public void testUnskippableChunk() {
-        final byte[] input = new byte[] {
+        final byte[] input = {
             (byte) 0xff, 6, 0, 0, 's', 'N', 'a', 'P', 'p', 'Y',
             2, 2, 0, 0, 1, 1
         };
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java
index d33d5937..59731f0b 100755
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java
@@ -296,7 +296,7 @@ public class ArchiveTest extends TestCase {
 		}
     }
 
-    private void compareJarEntries(JarFile jarFile, JarFile jarFile2) {
+    private void compareJarEntries(final JarFile jarFile, final JarFile jarFile2) {
         Enumeration<JarEntry> entries = jarFile.entries();
         while (entries.hasMoreElements()) {
 
@@ -309,7 +309,7 @@ public class ArchiveTest extends TestCase {
         }
     }
 
-    private void compareFiles(JarFile jarFile, JarFile jarFile2)
+    private void compareFiles(final JarFile jarFile, final JarFile jarFile2)
             throws IOException {
         Enumeration<JarEntry> entries = jarFile.entries();
         while (entries.hasMoreElements()) {
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/BHSDCodecTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/BHSDCodecTest.java
index 037cf7b3..783e0984 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/BHSDCodecTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/BHSDCodecTest.java
@@ -73,7 +73,7 @@ public class BHSDCodecTest extends TestCase {
 
     public void testDeltaEncodings() throws IOException, Pack200Exception {
         Codec c = Codec.UDELTA5;
-        int[] sequence = new int[] {0, 2, 4, 2, 2, 4};
+        int[] sequence = {0, 2, 4, 2, 2, 4};
         byte[] encoded = c.encode(sequence);
         int[] decoded = c.decodeInts(6, new ByteArrayInputStream(encoded));
         for (int i = 0; i < decoded.length; i++) {
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecEncodingTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecEncodingTest.java
index c69592c7..a3cf6265 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecEncodingTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecEncodingTest.java
@@ -42,123 +42,123 @@ public class CodecEncodingTest extends TestCase {
                 .getCodec(0, null, defaultCodec));
         Map<Integer, String> map = new HashMap<>();
         // These are the canonical encodings specified by the Pack200 spec
-        map.put(new Integer(1), "(1,256)");
-        map.put(new Integer(2), "(1,256,1)");
-        map.put(new Integer(3), "(1,256,0,1)");
-        map.put(new Integer(4), "(1,256,1,1)");
-        map.put(new Integer(5), "(2,256)");
-        map.put(new Integer(6), "(2,256,1)");
-        map.put(new Integer(7), "(2,256,0,1)");
-        map.put(new Integer(8), "(2,256,1,1)");
-        map.put(new Integer(9), "(3,256)");
-        map.put(new Integer(10), "(3,256,1)");
-        map.put(new Integer(11), "(3,256,0,1)");
-        map.put(new Integer(12), "(3,256,1,1)");
-        map.put(new Integer(13), "(4,256)");
-        map.put(new Integer(14), "(4,256,1)");
-        map.put(new Integer(15), "(4,256,0,1)");
-        map.put(new Integer(16), "(4,256,1,1)");
-        map.put(new Integer(17), "(5,4)");
-        map.put(new Integer(18), "(5,4,1)");
-        map.put(new Integer(19), "(5,4,2)");
-        map.put(new Integer(20), "(5,16)");
-        map.put(new Integer(21), "(5,16,1)");
-        map.put(new Integer(22), "(5,16,2)");
-        map.put(new Integer(23), "(5,32)");
-        map.put(new Integer(24), "(5,32,1)");
-        map.put(new Integer(25), "(5,32,2)");
-        map.put(new Integer(26), "(5,64)");
-        map.put(new Integer(27), "(5,64,1)");
-        map.put(new Integer(28), "(5,64,2)");
-        map.put(new Integer(29), "(5,128)");
-        map.put(new Integer(30), "(5,128,1)");
-        map.put(new Integer(31), "(5,128,2)");
-        map.put(new Integer(32), "(5,4,0,1)");
-        map.put(new Integer(33), "(5,4,1,1)");
-        map.put(new Integer(34), "(5,4,2,1)");
-        map.put(new Integer(35), "(5,16,0,1)");
-        map.put(new Integer(36), "(5,16,1,1)");
-        map.put(new Integer(37), "(5,16,2,1)");
-        map.put(new Integer(38), "(5,32,0,1)");
-        map.put(new Integer(39), "(5,32,1,1)");
-        map.put(new Integer(40), "(5,32,2,1)");
-        map.put(new Integer(41), "(5,64,0,1)");
-        map.put(new Integer(42), "(5,64,1,1)");
-        map.put(new Integer(43), "(5,64,2,1)");
-        map.put(new Integer(44), "(5,128,0,1)");
-        map.put(new Integer(45), "(5,128,1,1)");
-        map.put(new Integer(46), "(5,128,2,1)");
-        map.put(new Integer(47), "(2,192)");
-        map.put(new Integer(48), "(2,224)");
-        map.put(new Integer(49), "(2,240)");
-        map.put(new Integer(50), "(2,248)");
-        map.put(new Integer(51), "(2,252)");
-        map.put(new Integer(52), "(2,8,0,1)");
-        map.put(new Integer(53), "(2,8,1,1)");
-        map.put(new Integer(54), "(2,16,0,1)");
-        map.put(new Integer(55), "(2,16,1,1)");
-        map.put(new Integer(56), "(2,32,0,1)");
-        map.put(new Integer(57), "(2,32,1,1)");
-        map.put(new Integer(58), "(2,64,0,1)");
-        map.put(new Integer(59), "(2,64,1,1)");
-        map.put(new Integer(60), "(2,128,0,1)");
-        map.put(new Integer(61), "(2,128,1,1)");
-        map.put(new Integer(62), "(2,192,0,1)");
-        map.put(new Integer(63), "(2,192,1,1)");
-        map.put(new Integer(64), "(2,224,0,1)");
-        map.put(new Integer(65), "(2,224,1,1)");
-        map.put(new Integer(66), "(2,240,0,1)");
-        map.put(new Integer(67), "(2,240,1,1)");
-        map.put(new Integer(68), "(2,248,0,1)");
-        map.put(new Integer(69), "(2,248,1,1)");
-        map.put(new Integer(70), "(3,192)");
-        map.put(new Integer(71), "(3,224)");
-        map.put(new Integer(72), "(3,240)");
-        map.put(new Integer(73), "(3,248)");
-        map.put(new Integer(74), "(3,252)");
-        map.put(new Integer(75), "(3,8,0,1)");
-        map.put(new Integer(76), "(3,8,1,1)");
-        map.put(new Integer(77), "(3,16,0,1)");
-        map.put(new Integer(78), "(3,16,1,1)");
-        map.put(new Integer(79), "(3,32,0,1)");
-        map.put(new Integer(80), "(3,32,1,1)");
-        map.put(new Integer(81), "(3,64,0,1)");
-        map.put(new Integer(82), "(3,64,1,1)");
-        map.put(new Integer(83), "(3,128,0,1)");
-        map.put(new Integer(84), "(3,128,1,1)");
-        map.put(new Integer(85), "(3,192,0,1)");
-        map.put(new Integer(86), "(3,192,1,1)");
-        map.put(new Integer(87), "(3,224,0,1)");
-        map.put(new Integer(88), "(3,224,1,1)");
-        map.put(new Integer(89), "(3,240,0,1)");
-        map.put(new Integer(90), "(3,240,1,1)");
-        map.put(new Integer(91), "(3,248,0,1)");
-        map.put(new Integer(92), "(3,248,1,1)");
-        map.put(new Integer(93), "(4,192)");
-        map.put(new Integer(94), "(4,224)");
-        map.put(new Integer(95), "(4,240)");
-        map.put(new Integer(96), "(4,248)");
-        map.put(new Integer(97), "(4,252)");
-        map.put(new Integer(98), "(4,8,0,1)");
-        map.put(new Integer(99), "(4,8,1,1)");
-        map.put(new Integer(100), "(4,16,0,1)");
-        map.put(new Integer(101), "(4,16,1,1)");
-        map.put(new Integer(102), "(4,32,0,1)");
-        map.put(new Integer(103), "(4,32,1,1)");
-        map.put(new Integer(104), "(4,64,0,1)");
-        map.put(new Integer(105), "(4,64,1,1)");
-        map.put(new Integer(106), "(4,128,0,1)");
-        map.put(new Integer(107), "(4,128,1,1)");
-        map.put(new Integer(108), "(4,192,0,1)");
-        map.put(new Integer(109), "(4,192,1,1)");
-        map.put(new Integer(110), "(4,224,0,1)");
-        map.put(new Integer(111), "(4,224,1,1)");
-        map.put(new Integer(112), "(4,240,0,1)");
-        map.put(new Integer(113), "(4,240,1,1)");
-        map.put(new Integer(114), "(4,248,0,1)");
-        map.put(new Integer(115), "(4,248,1,1)");
+        map.put(Integer.valueOf(1), "(1,256)");
+        map.put(Integer.valueOf(2), "(1,256,1)");
+        map.put(Integer.valueOf(3), "(1,256,0,1)");
+        map.put(Integer.valueOf(4), "(1,256,1,1)");
+        map.put(Integer.valueOf(5), "(2,256)");
+        map.put(Integer.valueOf(6), "(2,256,1)");
+        map.put(Integer.valueOf(7), "(2,256,0,1)");
+        map.put(Integer.valueOf(8), "(2,256,1,1)");
+        map.put(Integer.valueOf(9), "(3,256)");
+        map.put(Integer.valueOf(10), "(3,256,1)");
+        map.put(Integer.valueOf(11), "(3,256,0,1)");
+        map.put(Integer.valueOf(12), "(3,256,1,1)");
+        map.put(Integer.valueOf(13), "(4,256)");
+        map.put(Integer.valueOf(14), "(4,256,1)");
+        map.put(Integer.valueOf(15), "(4,256,0,1)");
+        map.put(Integer.valueOf(16), "(4,256,1,1)");
+        map.put(Integer.valueOf(17), "(5,4)");
+        map.put(Integer.valueOf(18), "(5,4,1)");
+        map.put(Integer.valueOf(19), "(5,4,2)");
+        map.put(Integer.valueOf(20), "(5,16)");
+        map.put(Integer.valueOf(21), "(5,16,1)");
+        map.put(Integer.valueOf(22), "(5,16,2)");
+        map.put(Integer.valueOf(23), "(5,32)");
+        map.put(Integer.valueOf(24), "(5,32,1)");
+        map.put(Integer.valueOf(25), "(5,32,2)");
+        map.put(Integer.valueOf(26), "(5,64)");
+        map.put(Integer.valueOf(27), "(5,64,1)");
+        map.put(Integer.valueOf(28), "(5,64,2)");
+        map.put(Integer.valueOf(29), "(5,128)");
+        map.put(Integer.valueOf(30), "(5,128,1)");
+        map.put(Integer.valueOf(31), "(5,128,2)");
+        map.put(Integer.valueOf(32), "(5,4,0,1)");
+        map.put(Integer.valueOf(33), "(5,4,1,1)");
+        map.put(Integer.valueOf(34), "(5,4,2,1)");
+        map.put(Integer.valueOf(35), "(5,16,0,1)");
+        map.put(Integer.valueOf(36), "(5,16,1,1)");
+        map.put(Integer.valueOf(37), "(5,16,2,1)");
+        map.put(Integer.valueOf(38), "(5,32,0,1)");
+        map.put(Integer.valueOf(39), "(5,32,1,1)");
+        map.put(Integer.valueOf(40), "(5,32,2,1)");
+        map.put(Integer.valueOf(41), "(5,64,0,1)");
+        map.put(Integer.valueOf(42), "(5,64,1,1)");
+        map.put(Integer.valueOf(43), "(5,64,2,1)");
+        map.put(Integer.valueOf(44), "(5,128,0,1)");
+        map.put(Integer.valueOf(45), "(5,128,1,1)");
+        map.put(Integer.valueOf(46), "(5,128,2,1)");
+        map.put(Integer.valueOf(47), "(2,192)");
+        map.put(Integer.valueOf(48), "(2,224)");
+        map.put(Integer.valueOf(49), "(2,240)");
+        map.put(Integer.valueOf(50), "(2,248)");
+        map.put(Integer.valueOf(51), "(2,252)");
+        map.put(Integer.valueOf(52), "(2,8,0,1)");
+        map.put(Integer.valueOf(53), "(2,8,1,1)");
+        map.put(Integer.valueOf(54), "(2,16,0,1)");
+        map.put(Integer.valueOf(55), "(2,16,1,1)");
+        map.put(Integer.valueOf(56), "(2,32,0,1)");
+        map.put(Integer.valueOf(57), "(2,32,1,1)");
+        map.put(Integer.valueOf(58), "(2,64,0,1)");
+        map.put(Integer.valueOf(59), "(2,64,1,1)");
+        map.put(Integer.valueOf(60), "(2,128,0,1)");
+        map.put(Integer.valueOf(61), "(2,128,1,1)");
+        map.put(Integer.valueOf(62), "(2,192,0,1)");
+        map.put(Integer.valueOf(63), "(2,192,1,1)");
+        map.put(Integer.valueOf(64), "(2,224,0,1)");
+        map.put(Integer.valueOf(65), "(2,224,1,1)");
+        map.put(Integer.valueOf(66), "(2,240,0,1)");
+        map.put(Integer.valueOf(67), "(2,240,1,1)");
+        map.put(Integer.valueOf(68), "(2,248,0,1)");
+        map.put(Integer.valueOf(69), "(2,248,1,1)");
+        map.put(Integer.valueOf(70), "(3,192)");
+        map.put(Integer.valueOf(71), "(3,224)");
+        map.put(Integer.valueOf(72), "(3,240)");
+        map.put(Integer.valueOf(73), "(3,248)");
+        map.put(Integer.valueOf(74), "(3,252)");
+        map.put(Integer.valueOf(75), "(3,8,0,1)");
+        map.put(Integer.valueOf(76), "(3,8,1,1)");
+        map.put(Integer.valueOf(77), "(3,16,0,1)");
+        map.put(Integer.valueOf(78), "(3,16,1,1)");
+        map.put(Integer.valueOf(79), "(3,32,0,1)");
+        map.put(Integer.valueOf(80), "(3,32,1,1)");
+        map.put(Integer.valueOf(81), "(3,64,0,1)");
+        map.put(Integer.valueOf(82), "(3,64,1,1)");
+        map.put(Integer.valueOf(83), "(3,128,0,1)");
+        map.put(Integer.valueOf(84), "(3,128,1,1)");
+        map.put(Integer.valueOf(85), "(3,192,0,1)");
+        map.put(Integer.valueOf(86), "(3,192,1,1)");
+        map.put(Integer.valueOf(87), "(3,224,0,1)");
+        map.put(Integer.valueOf(88), "(3,224,1,1)");
+        map.put(Integer.valueOf(89), "(3,240,0,1)");
+        map.put(Integer.valueOf(90), "(3,240,1,1)");
+        map.put(Integer.valueOf(91), "(3,248,0,1)");
+        map.put(Integer.valueOf(92), "(3,248,1,1)");
+        map.put(Integer.valueOf(93), "(4,192)");
+        map.put(Integer.valueOf(94), "(4,224)");
+        map.put(Integer.valueOf(95), "(4,240)");
+        map.put(Integer.valueOf(96), "(4,248)");
+        map.put(Integer.valueOf(97), "(4,252)");
+        map.put(Integer.valueOf(98), "(4,8,0,1)");
+        map.put(Integer.valueOf(99), "(4,8,1,1)");
+        map.put(Integer.valueOf(100), "(4,16,0,1)");
+        map.put(Integer.valueOf(101), "(4,16,1,1)");
+        map.put(Integer.valueOf(102), "(4,32,0,1)");
+        map.put(Integer.valueOf(103), "(4,32,1,1)");
+        map.put(Integer.valueOf(104), "(4,64,0,1)");
+        map.put(Integer.valueOf(105), "(4,64,1,1)");
+        map.put(Integer.valueOf(106), "(4,128,0,1)");
+        map.put(Integer.valueOf(107), "(4,128,1,1)");
+        map.put(Integer.valueOf(108), "(4,192,0,1)");
+        map.put(Integer.valueOf(109), "(4,192,1,1)");
+        map.put(Integer.valueOf(110), "(4,224,0,1)");
+        map.put(Integer.valueOf(111), "(4,224,1,1)");
+        map.put(Integer.valueOf(112), "(4,240,0,1)");
+        map.put(Integer.valueOf(113), "(4,240,1,1)");
+        map.put(Integer.valueOf(114), "(4,248,0,1)");
+        map.put(Integer.valueOf(115), "(4,248,1,1)");
         for (int i = 1; i <= 115; i++) {
-            assertEquals(map.get(new Integer(i)), CodecEncoding.getCodec(i,
+            assertEquals(map.get(Integer.valueOf(i)), CodecEncoding.getCodec(i,
                     null, null).toString());
         }
     }
@@ -186,7 +186,7 @@ public class CodecEncodingTest extends TestCase {
         int[] specifiers = CodecEncoding.getSpecifier(c1, null);
         assertEquals(3, specifiers.length);
         assertEquals(116, specifiers[0]);
-        byte[] bytes = new byte[] {(byte) specifiers[1], (byte) specifiers[2]};
+        byte[] bytes = {(byte) specifiers[1], (byte) specifiers[2]};
         InputStream in = new ByteArrayInputStream(bytes);
         assertEquals(c1, CodecEncoding.getCodec(116, in, null));
 
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecTest.java
index bc8b9fa0..5a0599a3 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/CodecTest.java
@@ -218,7 +218,7 @@ public class CodecTest extends TestCase {
         checkAscendingCardinalities(CanonicalCodecFamilies.deltaDoubleSignedCodecs1);
     }
 
-    private void checkAscendingCardinalities(BHSDCodec[] family) {
+    private void checkAscendingCardinalities(final BHSDCodec[] family) {
         for (int i = 1; i < family.length; i++) {
             BHSDCodec previous = family[i-1];
             BHSDCodec codec = family[i];
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/HelloWorld.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/HelloWorld.java
index b389fe6c..bec1edbc 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/HelloWorld.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/HelloWorld.java
@@ -26,11 +26,11 @@ public class HelloWorld {
     long l = 299792458;
     double d = 4.0d;
 
-    public static void main(String[] args) {
+    public static void main(final String[] args) {
         System.out.println("Hello world");
     }
 
-    public HelloWorld[][] method(int a, int b, int c) {
+    public HelloWorld[][] method(final int a, final int b, final int c) {
         return null;
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/NewAttributeBandsTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/NewAttributeBandsTest.java
index 90d5ada8..9cfc6daa 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/NewAttributeBandsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/NewAttributeBandsTest.java
@@ -81,7 +81,7 @@ public class NewAttributeBandsTest extends TestCase {
         tryIntegral("POI");
     }
 
-    private void tryIntegral(String layoutStr) throws IOException {
+    private void tryIntegral(final String layoutStr) throws IOException {
         CPUTF8 name = new CPUTF8("TestAttribute");
         CPUTF8 layout = new CPUTF8(layoutStr);
         MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
@@ -139,7 +139,7 @@ public class NewAttributeBandsTest extends TestCase {
         tryReference("RQNI");
     }
 
-    private void tryReference(String layoutStr) throws IOException {
+    private void tryReference(final String layoutStr) throws IOException {
         CPUTF8 name = new CPUTF8("TestAttribute");
         CPUTF8 layout = new CPUTF8(layoutStr);
         MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
@@ -318,8 +318,8 @@ public class NewAttributeBandsTest extends TestCase {
 
     private class MockNewAttributeBands extends NewAttributeBands {
 
-        public MockNewAttributeBands(int effort, CpBands cpBands,
-                SegmentHeader header, AttributeDefinition def)
+        public MockNewAttributeBands(final int effort, final CpBands cpBands,
+                final SegmentHeader header, final AttributeDefinition def)
                 throws IOException {
             super(effort, cpBands, header, def);
         }
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PackingOptionsTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PackingOptionsTest.java
index 68e76df5..baf4fad8 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PackingOptionsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PackingOptionsTest.java
@@ -637,7 +637,7 @@ public class PackingOptionsTest extends TestCase {
     // compareFiles(in, new JarFile(file));
     // }
 
-    private void compareJarEntries(JarFile jarFile, JarFile jarFile2) {
+    private void compareJarEntries(final JarFile jarFile, final JarFile jarFile2) {
         Enumeration<JarEntry> entries = jarFile.entries();
         while (entries.hasMoreElements()) {
 
@@ -650,7 +650,7 @@ public class PackingOptionsTest extends TestCase {
         }
     }
 
-    private void compareFiles(JarFile jarFile, JarFile jarFile2)
+    private void compareFiles(final JarFile jarFile, final JarFile jarFile2)
             throws IOException {
         Enumeration<JarEntry> entries = jarFile.entries();
         while (entries.hasMoreElements()) {
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PopulationCodecTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PopulationCodecTest.java
index 8979d5ab..30c96b86 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PopulationCodecTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/PopulationCodecTest.java
@@ -51,7 +51,7 @@ public class PopulationCodecTest extends TestCase {
                 2, 1, 4, 1 }, Codec.BYTE1);
     }
 
-    private void checkDecode(byte[] data, long[] expectedResult, Codec codec)
+    private void checkDecode(final byte[] data, final long[] expectedResult, final Codec codec)
             throws IOException, Pack200Exception {
         InputStream in = new ByteArrayInputStream(data);
 
diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/RunCodecTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/RunCodecTest.java
index 2e7ba000..adcb011a 100644
--- a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/RunCodecTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/RunCodecTest.java
@@ -75,7 +75,7 @@ public class RunCodecTest extends TestCase {
     }
 
     public void testDecodeInts() throws Exception {
-        int[] band = new int[] { 1, -2, -3, 1000, 55, 5, 10, 20 };
+        int[] band = { 1, -2, -3, 1000, 55, 5, 10, 20 };
         // first 5 of band to be encoded with DELTA5
         byte[] bytes1 = Codec.DELTA5.encode(new int[] { 1, -2, -3, 1000, 55 });
         // rest of band to be encoded with UNSIGNED5
@@ -93,7 +93,7 @@ public class RunCodecTest extends TestCase {
     }
 
     public void testNestedPopulationCodec() throws Exception {
-        int[] band = new int[] { 11, 12, 33, 4000, -555, 5, 10, 20, 10, 3, 20,
+        int[] band = { 11, 12, 33, 4000, -555, 5, 10, 20, 10, 3, 20,
                 20, 20, 10, 10, 999, 20, 789, 10, 10, 355, 12345 };
         // first 5 of band to be encoded with DELTA5
         byte[] bytes1 = Codec.DELTA5
@@ -118,7 +118,7 @@ public class RunCodecTest extends TestCase {
     }
 
     public void testNestedRunCodec() throws Exception {
-        int[] band = new int[] { 1, 2, 3, 10, 20, 30, 100, 200, 300 };
+        int[] band = { 1, 2, 3, 10, 20, 30, 100, 200, 300 };
         // first 3 of band to be encoded with UDELTA5
         byte[] bytes1 = Codec.UDELTA5.encode(new int[] { 1, 2, 3 });
         // rest of band to be encoded with a RunCodec
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AbstractBandsTestCase.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AbstractBandsTestCase.java
index 5ee7b887..07836afd 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AbstractBandsTestCase.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AbstractBandsTestCase.java
@@ -35,7 +35,7 @@ public abstract class AbstractBandsTestCase extends TestCase {
 
     public class MockSegmentHeader extends SegmentHeader {
 
-        public MockSegmentHeader(Segment segment) {
+        public MockSegmentHeader(final Segment segment) {
             super(segment);
         }
 
@@ -56,7 +56,7 @@ public abstract class AbstractBandsTestCase extends TestCase {
 
     public class MockAttributeDefinitionBands extends AttrDefinitionBands {
 
-        public MockAttributeDefinitionBands(Segment segment) {
+        public MockAttributeDefinitionBands(final Segment segment) {
             super(segment);
         }
 
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AttributeLayoutTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AttributeLayoutTest.java
index 484ecb45..b2639f5a 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AttributeLayoutTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/AttributeLayoutTest.java
@@ -32,7 +32,7 @@ public class AttributeLayoutTest extends TestCase {
 
         @Override
         public SegmentConstantPool getConstantPool() {
-            final ClassFileEntry[][] data = new ClassFileEntry[][] {
+            final ClassFileEntry[][] data = {
                     {}, // ALL
                     { entry("Zero"), entry("One"), entry("Two"),
                             entry("Three"), entry("Four"), entry("Five"),
@@ -51,7 +51,7 @@ public class AttributeLayoutTest extends TestCase {
             return new SegmentConstantPool(null) {
 
                 @Override
-                public ClassFileEntry getValue(int cp, long index) {
+                public ClassFileEntry getValue(final int cp, final long index) {
                     if (index == -1) {
                         return null;
                     }
@@ -61,7 +61,7 @@ public class AttributeLayoutTest extends TestCase {
             };
         }
 
-        private ClassFileEntry entry(String string) {
+        private ClassFileEntry entry(final String string) {
             return new CPUTF8(string);
         }
     }
@@ -134,7 +134,7 @@ public class AttributeLayoutTest extends TestCase {
         assertEquals(Codec.BYTE1, layout.getCodec());
     }
 
-    public boolean throwsException(String name, int context, String layout) {
+    public boolean throwsException(final String name, final int context, final String layout) {
         try {
             new AttributeLayout(name, context, layout, -1);
             return false;
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BandSetTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BandSetTest.java
index a3ea6e70..1fe7e442 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BandSetTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BandSetTest.java
@@ -42,7 +42,7 @@ public class BandSetTest extends TestCase {
     private final BandSet bandSet = new BandSet(new MockSegment()) {
 
         @Override
-        public void read(InputStream inputStream) throws IOException,
+        public void read(final InputStream inputStream) throws IOException,
                 Pack200Exception {
         }
 
@@ -54,7 +54,7 @@ public class BandSetTest extends TestCase {
 
     public void testDecodeBandInt() throws IOException, Pack200Exception {
         BHSDCodec codec = Codec.BYTE1;
-        byte[] bytes = new byte[] { (byte) 3, (byte) 56, (byte) 122, (byte) 78 };
+        byte[] bytes = { (byte) 3, (byte) 56, (byte) 122, (byte) 78 };
         InputStream in = new ByteArrayInputStream(bytes);
         int[] ints = bandSet.decodeBandInt("Test Band", in, codec, 4);
         for (int i = 0; i < ints.length; i++) {
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
index 7f89d214..72e3a5b3 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/BcBandsTest.java
@@ -59,52 +59,52 @@ public class BcBandsTest extends AbstractBandsTestCase {
         private final CPNameAndType descriptor = new CPNameAndType(new CPUTF8(
                 "Hello"), new CPUTF8("(a, b, c)"), -1);
 
-        public MockCpBands(Segment segment) {
+        public MockCpBands(final Segment segment) {
             super(segment);
         }
 
         @Override
-        public CPString cpStringValue(int index) {
+        public CPString cpStringValue(final int index) {
             return new CPString(cpUTF8, index);
         }
 
         @Override
-        public CPInteger cpIntegerValue(int index) {
-            return new CPInteger(new Integer(21), index);
+        public CPInteger cpIntegerValue(final int index) {
+            return new CPInteger(Integer.valueOf(21), index);
         }
 
         @Override
-        public CPClass cpClassValue(int index) {
+        public CPClass cpClassValue(final int index) {
             return cpClass;
         }
 
         @Override
-        public CPFloat cpFloatValue(int index) {
-            return new CPFloat(new Float(2.5F), index);
+        public CPFloat cpFloatValue(final int index) {
+            return new CPFloat(Float.valueOf(2.5F), index);
         }
 
         @Override
-        public CPLong cpLongValue(int index) {
-            return new CPLong(new Long(21L), index);
+        public CPLong cpLongValue(final int index) {
+            return new CPLong(Long.valueOf(21L), index);
         }
 
         @Override
-        public CPDouble cpDoubleValue(int index) {
-            return new CPDouble(new Double(2.5D), index);
+        public CPDouble cpDoubleValue(final int index) {
+            return new CPDouble(Double.valueOf(2.5D), index);
         }
 
         @Override
-        public CPFieldRef cpFieldValue(int index) {
+        public CPFieldRef cpFieldValue(final int index) {
             return new CPFieldRef(cpClass, descriptor, index);
         }
 
         @Override
-        public CPMethodRef cpMethodValue(int index) {
+        public CPMethodRef cpMethodValue(final int index) {
             return new CPMethodRef(cpClass, descriptor, index);
         }
 
         @Override
-        public CPInterfaceMethodRef cpIMethodValue(int index) {
+        public CPInterfaceMethodRef cpIMethodValue(final int index) {
             return new CPInterfaceMethodRef(cpClass, descriptor, index);
         }
 
@@ -131,7 +131,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
 
     public class MockClassBands extends ClassBands {
 
-        public MockClassBands(Segment segment) {
+        public MockClassBands(final Segment segment) {
             super(segment);
         }
 
@@ -265,7 +265,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws Pack200Exception
      */
     public void testSimple() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+        byte[] bytes = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
                 13, 14, 15, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
                 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 59,
                 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
@@ -296,7 +296,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
             Pack200Exception {
         numClasses = 2;
         numMethods = new int[] { 1, 1 };
-        byte[] bytes = new byte[] { 50, 50, (byte) 255, 50, 50, (byte) 255 };
+        byte[] bytes = { 50, 50, (byte) 255, 50, 50, (byte) 255 };
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
         assertEquals(2, bcBands.getMethodByteCodePacked()[0][0].length);
@@ -317,7 +317,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
             Pack200Exception {
         numClasses = 2;
         numMethods = new int[] { 3, 1 };
-        byte[] bytes = new byte[] { 50, 50, (byte) 255, 50, 50, (byte) 255, 50,
+        byte[] bytes = { 50, 50, (byte) 255, 50, 50, (byte) 255, 50,
                 50, (byte) 255, 50, 50, (byte) 255 };
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -336,7 +336,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcCaseBands() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 170, (byte) 171, 0, 0, 0, 0, 0, 0,
+        byte[] bytes = { (byte) 170, (byte) 171, 0, 0, 0, 0, 0, 0,
                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte) 255, 2, 5, // bc_case_count
                 0, 0, 0, 0, 0, 0, 0, // bc_case_value
                 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // bc_label
@@ -360,7 +360,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcByteBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { 16, (byte) 132, (byte) 188, (byte) 197,
+        byte[] bytes = { 16, (byte) 132, (byte) 188, (byte) 197,
                 (byte) 255, 8, 8, 8, 8, // bc_byte band
                 8, // bc_locals band (required by iinc (132))
                 8 }; // bc_class band (required by multianewarray (197))
@@ -384,7 +384,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      */
     public void testBcShortBand() throws IOException, Pack200Exception {
         // TODO: Need to fix this testcase so it has enough data to pass.
-        byte[] bytes = new byte[] { 17, (byte) 196, (byte) 132, (byte) 255, 8,
+        byte[] bytes = { 17, (byte) 196, (byte) 132, (byte) 255, 8,
                 8,// bc_short band
                 8 }; // bc_locals band (required by wide iinc (196, 132))
         InputStream in = new ByteArrayInputStream(bytes);
@@ -401,7 +401,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcLocalBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { 21, 22, 23, 24, 25, 54, 55, 56, 57, 58,
+        byte[] bytes = { 21, 22, 23, 24, 25, 54, 55, 56, 57, 58,
                 (byte) 169, (byte) 255, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 }; // bc_local
         // band
         InputStream in = new ByteArrayInputStream(bytes);
@@ -417,7 +417,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcLabelBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 159, (byte) 160, (byte) 161,
+        byte[] bytes = { (byte) 159, (byte) 160, (byte) 161,
                 (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166,
                 (byte) 167, (byte) 168, (byte) 170, (byte) 171, (byte) 198,
                 (byte) 199, (byte) 200, (byte) 201, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -442,7 +442,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
     }
 
     public void testWideForms() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 196, (byte) 54, // wide istore
+        byte[] bytes = { (byte) 196, (byte) 54, // wide istore
                 (byte) 196, (byte) 132, // wide iinc
                 (byte) 255, 0, // bc_short band
                 0, 1 }; // bc_locals band
@@ -460,7 +460,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcIntRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 234, (byte) 237, (byte) 255, 8, 8 }; // bc_intref
+        byte[] bytes = { (byte) 234, (byte) 237, (byte) 255, 8, 8 }; // bc_intref
         // band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -476,7 +476,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcFloatRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 235, (byte) 238, (byte) 255, 8, 8 }; // bc_floatref
+        byte[] bytes = { (byte) 235, (byte) 238, (byte) 255, 8, 8 }; // bc_floatref
         // band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -492,7 +492,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcLongRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { 20, (byte) 255, 8 }; // bc_longref band
+        byte[] bytes = { 20, (byte) 255, 8 }; // bc_longref band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
         assertEquals(1, bcBands.getMethodByteCodePacked()[0][0].length);
@@ -507,7 +507,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcDoubleRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 239, (byte) 255, 8 }; // bc_doubleref
+        byte[] bytes = { (byte) 239, (byte) 255, 8 }; // bc_doubleref
         // band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -523,7 +523,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcStringRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { 18, 19, (byte) 255, 8, 8 }; // bc_stringref
+        byte[] bytes = { 18, 19, (byte) 255, 8, 8 }; // bc_stringref
         // band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -539,7 +539,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcClassRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 233, (byte) 236, (byte) 255, 8, 8 }; // bc_classref
+        byte[] bytes = { (byte) 233, (byte) 236, (byte) 255, 8, 8 }; // bc_classref
         // band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -555,7 +555,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcFieldRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 178, (byte) 179, (byte) 180,
+        byte[] bytes = { (byte) 178, (byte) 179, (byte) 180,
                 (byte) 181, (byte) 255, 8, 8, 8, 8 }; // bc_fieldref band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -571,7 +571,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcMethodRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 182, (byte) 183, (byte) 184,
+        byte[] bytes = { (byte) 182, (byte) 183, (byte) 184,
                 (byte) 255, 8, 8, 8 }; // bc_methodref band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -587,7 +587,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcIMethodRefBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 185, (byte) 255, 8 }; // bc_imethodref
+        byte[] bytes = { (byte) 185, (byte) 255, 8 }; // bc_imethodref
         // band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
@@ -603,7 +603,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcThisFieldBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 202, (byte) 203, (byte) 204,
+        byte[] bytes = { (byte) 202, (byte) 203, (byte) 204,
                 (byte) 205, (byte) 209, (byte) 210, (byte) 211, (byte) 212,
                 (byte) 255, 8, 8, 8, 8, 8, 8, 8, 8 }; // bc_thisfieldref band
         InputStream in = new ByteArrayInputStream(bytes);
@@ -620,7 +620,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcSuperFieldBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 216, (byte) 217, (byte) 218,
+        byte[] bytes = { (byte) 216, (byte) 217, (byte) 218,
                 (byte) 219, (byte) 223, (byte) 224, (byte) 225, (byte) 226,
                 (byte) 255, 8, 8, 8, 8, 8, 8, 8, 8 }; // bc_superfield band
         InputStream in = new ByteArrayInputStream(bytes);
@@ -637,7 +637,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
      * @throws IOException
      */
     public void testBcThisMethodBand() throws IOException, Pack200Exception {
-        byte[] bytes = new byte[] { (byte) 206, (byte) 207, (byte) 208,
+        byte[] bytes = { (byte) 206, (byte) 207, (byte) 208,
                 (byte) 213, (byte) 214, (byte) 215, (byte) 255, 8, 8, 8, 8, 8,
                 8 }; // bc_thismethod band
         InputStream in = new ByteArrayInputStream(bytes);
@@ -658,7 +658,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
         if (true) {
             return;
         }
-        byte[] bytes = new byte[] { (byte) 220, (byte) 221, (byte) 222,
+        byte[] bytes = { (byte) 220, (byte) 221, (byte) 222,
                 (byte) 227, (byte) 228, (byte) 229, (byte) 255, 8, 8, 8, 8, 8,
                 8 }; // bc_supermethod band
         InputStream in = new ByteArrayInputStream(bytes);
@@ -679,7 +679,7 @@ public class BcBandsTest extends AbstractBandsTestCase {
         if (true) {
             return;
         }
-        byte[] bytes = new byte[] { (byte) 230, (byte) 231, (byte) 232,
+        byte[] bytes = { (byte) 230, (byte) 231, (byte) 232,
                 (byte) 255, 8, 8, 8 }; // bc_initrefref band
         InputStream in = new ByteArrayInputStream(bytes);
         bcBands.unpack(in);
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/ClassBandsTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/ClassBandsTest.java
index d1274278..0ec784a0 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/ClassBandsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/ClassBandsTest.java
@@ -38,7 +38,7 @@ public class ClassBandsTest extends AbstractBandsTestCase {
 
     public class MockCpBands extends CpBands {
 
-        public MockCpBands(Segment segment) {
+        public MockCpBands(final Segment segment) {
             super(segment);
         }
 
@@ -104,7 +104,7 @@ public class ClassBandsTest extends AbstractBandsTestCase {
         byte[] classFieldCount = Codec.DELTA5.encode(0, 0);
         byte[] classMethodCount = Codec.DELTA5.encode(0, 0);
         byte[] classFlags = Codec.UNSIGNED5.encode(0, 0);
-        byte[][] allArrays = new byte[][] { classThis, classSuper,
+        byte[][] allArrays = { classThis, classSuper,
                 classInterfaceCount, classInterfaceRef1, classFieldCount,
                 classMethodCount, classFlags };
         int total = classThis.length + classSuper.length
@@ -144,7 +144,7 @@ public class ClassBandsTest extends AbstractBandsTestCase {
         byte[] methodFlagsLo = encodeBandInt(
                 new int[] { 0, 0, 0 }, Codec.UNSIGNED5);
         byte[] classFlags = Codec.UNSIGNED5.encode(0, 0);
-        byte[][] allArrays = new byte[][] { classThis, classSuper,
+        byte[][] allArrays = { classThis, classSuper,
                 classInterfaceCount, classFieldCount, classMethodCount,
                 methodDescr, methodFlagsLo, classFlags, };
         int total = 0;
@@ -173,7 +173,7 @@ public class ClassBandsTest extends AbstractBandsTestCase {
         cpDescriptor = null;
     }
 
-    public byte[] encodeBandInt(int[] data, BHSDCodec codec)
+    public byte[] encodeBandInt(final int[] data, final BHSDCodec codec)
             throws IOException, Pack200Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         for (int i = 0; i < data.length; i++) {
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/CodeAttributeTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/CodeAttributeTest.java
index 63c0348b..4952253b 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/CodeAttributeTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/CodeAttributeTest.java
@@ -40,8 +40,8 @@ public class CodeAttributeTest extends TestCase {
 
 	public class MockCodeAttribute extends CodeAttribute {
 
-		public MockCodeAttribute(int maxStack, int maxLocals, byte[] codePacked, Segment segment,
-				OperandManager operandManager, List<ExceptionTableEntry> exceptionTable) {
+		public MockCodeAttribute(final int maxStack, final int maxLocals, final byte[] codePacked, final Segment segment,
+				final OperandManager operandManager, final List<ExceptionTableEntry> exceptionTable) {
 			super(maxStack, maxLocals, codePacked, segment, operandManager, exceptionTable);
 		}
 
@@ -53,22 +53,22 @@ public class CodeAttributeTest extends TestCase {
 
     public class MockCpBands extends CpBands {
 
-        public MockCpBands(Segment segment) {
+        public MockCpBands(final Segment segment) {
             super(segment);
         }
 
         @Override
-        public CPFieldRef cpFieldValue(int index) {
+        public CPFieldRef cpFieldValue(final int index) {
             return null;
         }
 
         @Override
-        public CPString cpStringValue(int index) {
+        public CPString cpStringValue(final int index) {
             return new CPString(new CPUTF8("Hello"), -1);
         }
 
         @Override
-        public CPMethodRef cpMethodValue(int index) {
+        public CPMethodRef cpMethodValue(final int index) {
             return null;
         }
 
@@ -111,13 +111,13 @@ public class CodeAttributeTest extends TestCase {
 
     public class MockSegmentConstantPool extends SegmentConstantPool {
 
-        public MockSegmentConstantPool(CpBands bands) {
+        public MockSegmentConstantPool(final CpBands bands) {
             super(bands);
         }
 
         @Override
-        protected int matchSpecificPoolEntryIndex(String[] nameArray,
-                String compareString, int desiredIndex) {
+        protected int matchSpecificPoolEntryIndex(final String[] nameArray,
+                final String compareString, final int desiredIndex) {
             return 1;
         }
     }
@@ -174,7 +174,7 @@ public class CodeAttributeTest extends TestCase {
         assertEquals("aload_0_putfield_this", attribute.byteCodes
                 .get(4).toString());
 
-        int expectedLabels[] = new int[] { 0, 1, 4, 5, 8, 9, 10, 13, 14 };
+        int expectedLabels[] = { 0, 1, 4, 5, 8, 9, 10, 13, 14 };
         for (int index = 0; index < expectedLabels.length; index++) {
             assertEquals(expectedLabels[index],
                     attribute.byteCodeOffsets.get(index).intValue());
@@ -197,7 +197,7 @@ public class CodeAttributeTest extends TestCase {
         assertEquals("invokespecial_this", attribute.byteCodes
                 .get(3).toString());
 
-        int expectedLabels[] = new int[] { 0, 1, 2, 4 };
+        int expectedLabels[] = { 0, 1, 2, 4 };
         for (int index = 0; index < expectedLabels.length; index++) {
             assertEquals(expectedLabels[index],
                     attribute.byteCodeOffsets.get(index).intValue());
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/Codec_decodeInts_OutOfMemoryErrorTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/Codec_decodeInts_OutOfMemoryErrorTest.java
index 364125af..5a1589d4 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/Codec_decodeInts_OutOfMemoryErrorTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/Codec_decodeInts_OutOfMemoryErrorTest.java
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 
 /**
  * Tests https://issues.apache.org/jira/browse/COMPRESS-599.
- * 
+ *
  * <pre>{@code
  * java.lang.OutOfMemoryError: Java heap space
   at org.apache.commons.compress.harmony.unpack200.CpBands.parseCpUtf8(CpBands.java:365)
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/NewAttributeBandsTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/NewAttributeBandsTest.java
index 441ee194..dab26ed4 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/NewAttributeBandsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/NewAttributeBandsTest.java
@@ -68,7 +68,7 @@ public class NewAttributeBandsTest extends AbstractBandsTestCase {
         tryIntegral("POI");
     }
 
-    public void tryIntegral(String layout) throws IOException, Pack200Exception {
+    public void tryIntegral(final String layout) throws IOException, Pack200Exception {
         MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(
                 new MockSegment(), new AttributeLayout("test",
                         AttributeLayout.CONTEXT_CLASS, layout, 25));
@@ -122,7 +122,7 @@ public class NewAttributeBandsTest extends AbstractBandsTestCase {
         tryReference("RQNI");
     }
 
-    private void tryReference(String layout) throws IOException,
+    private void tryReference(final String layout) throws IOException,
             Pack200Exception {
         MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(
                 new MockSegment(), new AttributeLayout("test",
@@ -244,7 +244,7 @@ public class NewAttributeBandsTest extends AbstractBandsTestCase {
 
     private class MockNewAttributeBands extends NewAttributeBands {
 
-        public MockNewAttributeBands(Segment segment, AttributeLayout layout)
+        public MockNewAttributeBands(final Segment segment, final AttributeLayout layout)
                 throws IOException {
             super(segment, layout);
         }
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentConstantPoolTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentConstantPoolTest.java
index 56aa4b3f..13e5aae6 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentConstantPoolTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentConstantPoolTest.java
@@ -34,23 +34,23 @@ public class SegmentConstantPoolTest extends TestCase {
         }
 
         @Override
-        public int matchSpecificPoolEntryIndex(String[] classNameArray,
-                String desiredClassName, int desiredIndex) {
+        public int matchSpecificPoolEntryIndex(final String[] classNameArray,
+                final String desiredClassName, final int desiredIndex) {
             return super.matchSpecificPoolEntryIndex(classNameArray,
                     desiredClassName, desiredIndex);
         }
 
         @Override
-        public int matchSpecificPoolEntryIndex(String[] classNameArray,
-                String[] methodNameArray, String desiredClassName,
-                String desiredMethodRegex, int desiredIndex) {
+        public int matchSpecificPoolEntryIndex(final String[] classNameArray,
+                final String[] methodNameArray, final String desiredClassName,
+                final String desiredMethodRegex, final int desiredIndex) {
             return super.matchSpecificPoolEntryIndex(classNameArray,
                     methodNameArray, desiredClassName, desiredMethodRegex,
                     desiredIndex);
         }
 
-        public boolean regexMatchesVisible(String regexString,
-                String compareString) {
+        public boolean regexMatchesVisible(final String regexString,
+                final String compareString) {
             return SegmentConstantPool.regexMatches(regexString, compareString);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentOptionsTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentOptionsTest.java
index 28f1cdbe..2b532c8d 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentOptionsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentOptionsTest.java
@@ -27,7 +27,7 @@ import junit.framework.TestCase;
 public class SegmentOptionsTest extends TestCase {
 
     public void testUnused() {
-        int[] unused = new int[] { 3, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+        int[] unused = { 3, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
                 23, 24, 25, 26, 27, 28, 29, 30, 31 };
         for (int element : unused) {
             try {
diff --git a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentUtilsTest.java b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentUtilsTest.java
index 7a370735..2cb43fc2 100644
--- a/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/harmony/unpack200/tests/SegmentUtilsTest.java
@@ -27,12 +27,12 @@ public class SegmentUtilsTest extends TestCase {
 
         private final int divisor;
 
-        public MultipleMatches(int divisor) {
+        public MultipleMatches(final int divisor) {
             this.divisor = divisor;
         }
 
         @Override
-        public boolean matches(long value) {
+        public boolean matches(final long value) {
             return value % divisor == 0;
         }
 
@@ -68,7 +68,7 @@ public class SegmentUtilsTest extends TestCase {
     }
 
     public void testMatches() {
-        long[] oneToTen = new long[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+        long[] oneToTen = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         assertEquals(6, SegmentUtils.countMatches(new long[][] { oneToTen,
                 new long[] { 5, 6, 7 } }, even));
         assertEquals(5, SegmentUtils.countMatches(new long[][] { oneToTen },
diff --git a/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java b/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
index 28ffb090..de85f8b3 100644
--- a/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
@@ -42,13 +42,13 @@ public class ByteUtilsTest {
 
     @Test
     public void fromLittleEndianFromArrayOneArg() {
-        final byte[] b = new byte[] { 2, 3, 4 };
+        final byte[] b = { 2, 3, 4 };
         assertEquals(2 + 3 * 256 + 4 * 256 * 256, fromLittleEndian(b));
     }
 
     @Test
     public void fromLittleEndianFromArrayOneArgUnsignedInt32() {
-        final byte[] b = new byte[] { 2, 3, 4, (byte) 128 };
+        final byte[] b = { 2, 3, 4, (byte) 128 };
         assertEquals(2 + 3 * 256 + 4 * 256 * 256 + 128L * 256 * 256 * 256, fromLittleEndian(b));
     }
 
@@ -59,13 +59,13 @@ public class ByteUtilsTest {
 
     @Test
     public void fromLittleEndianFromArray() {
-        final byte[] b = new byte[] { 1, 2, 3, 4, 5 };
+        final byte[] b = { 1, 2, 3, 4, 5 };
         assertEquals(2 + 3 * 256 + 4 * 256 * 256, fromLittleEndian(b, 1, 3));
     }
 
     @Test
     public void fromLittleEndianFromArrayUnsignedInt32() {
-        final byte[] b = new byte[] { 1, 2, 3, 4, (byte) 128 };
+        final byte[] b = { 1, 2, 3, 4, (byte) 128 };
         assertEquals(2 + 3 * 256 + 4 * 256 * 256 + 128L * 256 * 256 * 256, fromLittleEndian(b, 1, 4));
     }