Repository: commons-compress
Updated Branches:
  refs/heads/master e8457776f -> 979260717


use try-with-resources properly


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

Branch: refs/heads/master
Commit: 979260717c1a4730e49a094e02c9c873946e1237
Parents: e845777
Author: Stefan Bodewig <bode...@apache.org>
Authored: Sat Nov 10 21:55:55 2018 +0100
Committer: Stefan Bodewig <bode...@apache.org>
Committed: Sat Nov 10 21:55:55 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/commons/compress/archivers/TarTestCase.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/97926071/src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/compress/archivers/TarTestCase.java 
b/src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
index e694927..19fa51a 100644
--- a/src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
@@ -333,8 +333,8 @@ public final class TarTestCase extends AbstractTestCase {
     @Test
     public void testCOMPRESS178Lenient() throws Exception {
         final File input = getFile("COMPRESS-178.tar");
-        final InputStream is = new FileInputStream(input);
-        try (final ArchiveInputStream in = new TarArchiveInputStream(is, 
true)) {
+        try (final InputStream is = new FileInputStream(input);
+             final ArchiveInputStream in = new TarArchiveInputStream(is, 
true)) {
             in.getNextEntry();
         }
     }

Reply via email to