commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-compress git commit: Remove Redundant specification of type (Java 7).
Date Sat, 25 Jun 2016 21:22:12 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master d5aa050a6 -> e2d348e17


Remove Redundant specification of type (Java 7).

Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/e2d348e1
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/e2d348e1
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/e2d348e1

Branch: refs/heads/master
Commit: e2d348e17210d17060394d16c491f0e20783c10c
Parents: d5aa050
Author: Gary Gregory <ggregory@apache.org>
Authored: Sat Jun 25 14:22:10 2016 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Sat Jun 25 14:22:10 2016 -0700

----------------------------------------------------------------------
 .../org/apache/commons/compress/AbstractTestCase.java   |  6 +++---
 .../org/apache/commons/compress/ArchiveReadTest.java    |  4 ++--
 .../apache/commons/compress/archivers/CpioTestCase.java |  2 +-
 .../apache/commons/compress/archivers/DumpTestCase.java |  2 +-
 .../apache/commons/compress/archivers/LongPathTest.java |  4 ++--
 .../commons/compress/archivers/LongSymLinkTest.java     |  4 ++--
 .../apache/commons/compress/archivers/ZipTestCase.java  |  6 +++---
 .../archivers/ar/ArArchiveOutputStreamTest.java         |  2 +-
 .../compress/archivers/sevenz/SevenZFileTest.java       |  2 +-
 .../compress/archivers/sevenz/SevenZOutputFileTest.java |  6 +++---
 .../archivers/tar/TarArchiveOutputStreamTest.java       |  6 +++---
 .../archivers/zip/ParallelScatterZipCreatorTest.java    |  4 ++--
 .../commons/compress/archivers/zip/ZipFileTest.java     |  2 +-
 .../commons/compress/changes/ChangeSetTestCase.java     | 12 ++++++------
 .../commons/compress/compressors/Pack200TestCase.java   |  6 +++---
 15 files changed, 34 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/AbstractTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/AbstractTestCase.java b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
index a151a26..15326f5 100644
--- a/src/test/java/org/apache/commons/compress/AbstractTestCase.java
+++ b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
@@ -168,7 +168,7 @@ public abstract class AbstractTestCase {
         try {
             archive = File.createTempFile("test", "." + archivename);
             archive.deleteOnExit();
-            archiveList = new ArrayList<String>();
+            archiveList = new ArrayList<>();
 
             stream = new FileOutputStream(archive);
             out = factory.createArchiveOutputStream(archivename, stream);
@@ -227,7 +227,7 @@ public abstract class AbstractTestCase {
     protected File createEmptyArchive(final String archivename) throws Exception {
         ArchiveOutputStream out = null;
         OutputStream stream = null;
-        archiveList = new ArrayList<String>();
+        archiveList = new ArrayList<>();
         try {
             archive = File.createTempFile("empty", "." + archivename);
             archive.deleteOnExit();
@@ -254,7 +254,7 @@ public abstract class AbstractTestCase {
     protected File createSingleEntryArchive(final String archivename) throws Exception {
         ArchiveOutputStream out = null;
         OutputStream stream = null;
-        archiveList = new ArrayList<String>();
+        archiveList = new ArrayList<>();
         try {
             archive = File.createTempFile("empty", "." + archivename);
             archive.deleteOnExit();

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/ArchiveReadTest.java b/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
index 30d9896..4d32dfc 100644
--- a/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
+++ b/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
@@ -49,7 +49,7 @@ public class ArchiveReadTest extends AbstractTestCase {
 
     private static final ClassLoader CLASSLOADER = ArchiveReadTest.class.getClassLoader();
     private static final File ARCDIR = new File(CLASSLOADER.getResource("archives").getFile());
-    private static final ArrayList<String> FILELIST = new ArrayList<String>();
+    private static final ArrayList<String> FILELIST = new ArrayList<>();
 
     private final File file;
 
@@ -75,7 +75,7 @@ public class ArchiveReadTest extends AbstractTestCase {
     @Parameters(name = "file={0}")
     public static Collection<Object[]> data() {
         assertTrue(ARCDIR.exists());
-        final Collection<Object[]> params = new ArrayList<Object[]>();
+        final Collection<Object[]> params = new ArrayList<>();
         for (final String f : ARCDIR.list(new FilenameFilter() {
             @Override
             public boolean accept(final File dir, final String name) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java b/src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
index 5f623ca..bad0161 100644
--- a/src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
@@ -92,7 +92,7 @@ public final class CpioTestCase extends AbstractTestCase {
         final ArchiveInputStream in = new ArchiveStreamFactory().createArchiveInputStream("cpio",
is);
 
 
-        final Map<String, File> result = new HashMap<String, File>();
+        final Map<String, File> result = new HashMap<>();
         ArchiveEntry entry = null;
         while ((entry = in.getNextEntry()) != null) {
             final File cpioget = new File(dir, entry.getName());

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java b/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
index 899fdcd..2e4a652 100644
--- a/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
@@ -112,7 +112,7 @@ public final class DumpTestCase extends AbstractTestCase {
     }
 
     private void checkDumpArchive(final File f) throws Exception {
-        final ArrayList<String> expected = new ArrayList<String>();
+        final ArrayList<String> expected = new ArrayList<>();
         expected.add("");
         expected.add("lost+found/");
         expected.add("test1.xml");

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
index 77cffc8..6ee3811 100644
--- a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
@@ -56,7 +56,7 @@ public class LongPathTest extends AbstractTestCase {
 
     private static final ClassLoader CLASSLOADER = LongPathTest.class.getClassLoader();
     private static final File ARCDIR = new File(CLASSLOADER.getResource("longpath").getFile());
-    private static final ArrayList<String> FILELIST = new ArrayList<String>();
+    private static final ArrayList<String> FILELIST = new ArrayList<>();
 
     private final File file;
 
@@ -81,7 +81,7 @@ public class LongPathTest extends AbstractTestCase {
 
     @Parameters(name = "file={0}")
     public static Collection<Object[]> data() {
-        final Collection<Object[]> params = new ArrayList<Object[]>();
+        final Collection<Object[]> params = new ArrayList<>();
         for (final String f : ARCDIR.list(new FilenameFilter() {
             @Override
             public boolean accept(final File dir, final String name) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java b/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
index ae88f7f..4694783 100644
--- a/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
@@ -56,7 +56,7 @@ public class LongSymLinkTest extends AbstractTestCase {
 
     private static final ClassLoader CLASSLOADER = LongSymLinkTest.class.getClassLoader();
     private static final File ARCDIR = new File(CLASSLOADER.getResource("longsymlink").getFile());
-    private static final ArrayList<String> FILELIST = new ArrayList<String>();
+    private static final ArrayList<String> FILELIST = new ArrayList<>();
 
     private final File file;
 
@@ -81,7 +81,7 @@ public class LongSymLinkTest extends AbstractTestCase {
 
     @Parameters(name = "file={0}")
     public static Collection<Object[]> data() {
-        final Collection<Object[]> params = new ArrayList<Object[]>();
+        final Collection<Object[]> params = new ArrayList<>();
         for (final String f : ARCDIR.list(new FilenameFilter() {
             @Override
             public boolean accept(final File dir, final String name) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
index 88584fd..23479ea 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
@@ -77,7 +77,7 @@ public final class ZipTestCase extends AbstractTestCase {
         out.close();
 
         // Unarchive the same
-        final List<File> results = new ArrayList<File>();
+        final List<File> results = new ArrayList<>();
 
         final InputStream is = new FileInputStream(output);
         ArchiveInputStream in = null;
@@ -136,7 +136,7 @@ public final class ZipTestCase extends AbstractTestCase {
     public void testSkipsPK00Prefix() throws Exception {
         final File input = getFile("COMPRESS-208.zip");
         final InputStream is = new FileInputStream(input);
-        final ArrayList<String> al = new ArrayList<String>();
+        final ArrayList<String> al = new ArrayList<>();
         al.add("test1.xml");
         al.add("test2.xml");
         try {
@@ -208,7 +208,7 @@ public final class ZipTestCase extends AbstractTestCase {
     public void testListAllFilesWithNestedArchive() throws Exception {
         final File input = getFile("OSX_ArchiveWithNestedArchive.zip");
 
-        final List<String> results = new ArrayList<String>();
+        final List<String> results = new ArrayList<>();
 
         final InputStream is = new FileInputStream(input);
         ArchiveInputStream in = null;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStreamTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStreamTest.java
b/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStreamTest.java
index d63283c..f304739 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStreamTest.java
@@ -69,7 +69,7 @@ public class ArArchiveOutputStreamTest extends AbstractTestCase {
             os = null;
             fos = null;
 
-            final List<String> expected = new ArrayList<String>();
+            final List<String> expected = new ArrayList<>();
             expected.add("this_is_a_long_name.txt");
             checkArchiveContent(df[1], expected);
         } finally {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
----------------------------------------------------------------------
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 beb0d7f..78e3ffb 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
@@ -43,7 +43,7 @@ public class SevenZFileTest extends AbstractTestCase {
     @Test
     public void testRandomlySkippingEntries() throws Exception {
         // Read sequential reference.
-        final Map<String, byte[]> entriesByName = new HashMap<String, byte[]>();
+        final Map<String, byte[]> entriesByName = new HashMap<>();
         SevenZFile archive = new SevenZFile(getFile("COMPRESS-320/Copy.7z"));
         SevenZArchiveEntry entry;
         while ((entry = archive.getNextEntry()) != null) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
index 6c717ef..dd97190 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
@@ -307,7 +307,7 @@ public class SevenZOutputFileTest extends AbstractTestCase {
     @Test
     public void testStackOfContentCompressions() throws Exception {
         output = new File(dir, "multiple-methods.7z");
-        final ArrayList<SevenZMethodConfiguration> methods = new ArrayList<SevenZMethodConfiguration>();
+        final ArrayList<SevenZMethodConfiguration> methods = new ArrayList<>();
         methods.add(new SevenZMethodConfiguration(SevenZMethod.LZMA2));
         methods.add(new SevenZMethodConfiguration(SevenZMethod.COPY));
         methods.add(new SevenZMethodConfiguration(SevenZMethod.DEFLATE));
@@ -464,14 +464,14 @@ public class SevenZOutputFileTest extends AbstractTestCase {
 
     private void testRoundTrip(final SevenZMethod method) throws Exception {
         output = new File(dir, method + "-roundtrip.7z");
-        final ArrayList<SevenZMethodConfiguration> methods = new ArrayList<SevenZMethodConfiguration>();
+        final ArrayList<SevenZMethodConfiguration> methods = new ArrayList<>();
         methods.add(new SevenZMethodConfiguration(method));
         createAndReadBack(output, methods);
     }
 
     private void testFilterRoundTrip(final SevenZMethodConfiguration method) throws Exception
{
         output = new File(dir, method.getMethod() + "-roundtrip.7z");
-        final ArrayList<SevenZMethodConfiguration> methods = new ArrayList<SevenZMethodConfiguration>();
+        final ArrayList<SevenZMethodConfiguration> methods = new ArrayList<>();
         methods.add(method);
         methods.add(new SevenZMethodConfiguration(SevenZMethod.LZMA2));
         createAndReadBack(output, methods);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
----------------------------------------------------------------------
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 3465835..85cdb66 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
@@ -144,7 +144,7 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
 
     @Test
     public void testWriteSimplePaxHeaders() throws Exception {
-        final Map<String, String> m = new HashMap<String, String>();
+        final Map<String, String> m = new HashMap<>();
         m.put("a", "b");
         final byte[] data = writePaxHeader(m);
         assertEquals("00000000006 ",
@@ -158,7 +158,7 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
 
     @Test
     public void testPaxHeadersWithLength99() throws Exception {
-        final Map<String, String> m = new HashMap<String, String>();
+        final Map<String, String> m = new HashMap<>();
         m.put("a",
               "0123456789012345678901234567890123456789"
               + "01234567890123456789012345678901234567890123456789"
@@ -177,7 +177,7 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
 
     @Test
     public void testPaxHeadersWithLength101() throws Exception {
-        final Map<String, String> m = new HashMap<String, String>();
+        final Map<String, String> m = new HashMap<>();
         m.put("a",
               "0123456789012345678901234567890123456789"
               + "01234567890123456789012345678901234567890123456789"

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
b/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
index 0d9cd3e..b09da00 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
@@ -109,7 +109,7 @@ public class ParallelScatterZipCreatorTest {
     }
 
     private Map<String, byte[]> writeEntries(final ParallelScatterZipCreator zipCreator)
{
-        final Map<String, byte[]> entries = new HashMap<String, byte[]>();
+        final Map<String, byte[]> entries = new HashMap<>();
         for (int i = 0; i < NUMITEMS; i++){
             final byte[] payloadBytes = ("content" + i).getBytes();
             final ZipArchiveEntry za = createZipArchiveEntry(entries, i, payloadBytes);
@@ -124,7 +124,7 @@ public class ParallelScatterZipCreatorTest {
     }
 
     private Map<String, byte[]> writeEntriesAsCallable(final ParallelScatterZipCreator
zipCreator) {
-        final Map<String, byte[]> entries = new HashMap<String, byte[]>();
+        final Map<String, byte[]> entries = new HashMap<>();
         for (int i = 0; i < NUMITEMS; i++){
             final byte[] payloadBytes = ("content" + i).getBytes();
             final ZipArchiveEntry za = createZipArchiveEntry(entries, i, payloadBytes);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
----------------------------------------------------------------------
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 3876f59..4569e87 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
@@ -179,7 +179,7 @@ public class ZipFileTest {
     @Test
     public void testUnixSymlinkSampleFile() throws Exception {
         final String entryPrefix = "COMPRESS-214_unix_symlinks/";
-        final TreeMap<String, String> expectedVals = new TreeMap<String, String>();
+        final TreeMap<String, String> expectedVals = new TreeMap<>();
 
         // I threw in some Japanese characters to keep things interesting.
         expectedVals.put(entryPrefix + "link1", "../COMPRESS-214_unix_symlinks/./a/b/c/../../../\uF999");

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java b/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
index a546a89..396f2aa 100644
--- a/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
+++ b/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
@@ -766,7 +766,7 @@ public final class ChangeSetTestCase extends AbstractTestCase {
             }
         }
 
-        final List<String> expected = new ArrayList<String>();
+        final List<String> expected = new ArrayList<>();
         expected.add("test1.xml");
 
         this.checkArchiveContent(temp, expected);
@@ -805,7 +805,7 @@ public final class ChangeSetTestCase extends AbstractTestCase {
                 ais.close();
             }
         }
-        final List<String> expected = new ArrayList<String>();
+        final List<String> expected = new ArrayList<>();
         expected.add("test1.xml");
         this.checkArchiveContent(temp, expected);
     }
@@ -846,7 +846,7 @@ public final class ChangeSetTestCase extends AbstractTestCase {
                 ais.close();
             }
         }
-        final List<String> expected = new ArrayList<String>();
+        final List<String> expected = new ArrayList<>();
         expected.add("test1.xml");
         this.checkArchiveContent(temp, expected);
     }
@@ -893,7 +893,7 @@ public final class ChangeSetTestCase extends AbstractTestCase {
                 ais.close();
             }
         }
-        final List<String> expected = new ArrayList<String>();
+        final List<String> expected = new ArrayList<>();
         expected.add("test1.xml");
         expected.add("testdata/test.txt");
         final ArchiveInputStream in = factory.createArchiveInputStream("tar", new FileInputStream(temp));
@@ -940,7 +940,7 @@ public final class ChangeSetTestCase extends AbstractTestCase {
                 ais.close();
             }
         }
-        final List<String> expected = new ArrayList<String>();
+        final List<String> expected = new ArrayList<>();
         expected.add("test1.xml");
         expected.add("testdata/test.txt");
         this.checkArchiveContent(temp, expected);
@@ -980,7 +980,7 @@ public final class ChangeSetTestCase extends AbstractTestCase {
             }
         }
 
-        final List<String> expected = new ArrayList<String>();
+        final List<String> expected = new ArrayList<>();
         expected.add("test1.xml");
         this.checkArchiveContent(temp, expected);
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e2d348e1/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java b/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
index 22a0488..6c11dd0 100644
--- a/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
@@ -136,7 +136,7 @@ public final class Pack200TestCase extends AbstractTestCase {
         try {
             final ArchiveInputStream in = new ArchiveStreamFactory()
                 .createArchiveInputStream("jar", is);
-            final List<String> files = new ArrayList<String>();
+            final List<String> files = new ArrayList<>();
             files.add("testdata/test1.xml");
             files.add("testdata/test2.xml");
             checkArchiveContent(in, files);
@@ -184,7 +184,7 @@ public final class Pack200TestCase extends AbstractTestCase {
 
     @Test
     public void testInputStreamMethods() throws Exception {
-        final Map<String, String> m = new HashMap<String, String>();
+        final Map<String, String> m = new HashMap<>();
         m.put("foo", "bar");
         final InputStream is =
             new Pack200CompressorInputStream(new FileInputStream(getFile("bla.jar")),
@@ -212,7 +212,7 @@ public final class Pack200TestCase extends AbstractTestCase {
     @Test
     public void testOutputStreamMethods() throws Exception {
         final File output = new File(dir, "bla.pack");
-        final Map<String, String> m = new HashMap<String, String>();
+        final Map<String, String> m = new HashMap<>();
         m.put("foo", "bar");
         final OutputStream out = new FileOutputStream(output);
         try {


Mime
View raw message