You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2012/12/27 21:50:18 UTC

svn commit: r1426312 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java

Author: bodewig
Date: Thu Dec 27 20:50:17 2012
New Revision: 1426312

URL: http://svn.apache.org/viewvc?rev=1426312&view=rev
Log:
COMPRESS-200 the test actually fails if encoding is specified explicitly

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java?rev=1426312&r1=1426311&r2=1426312&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java (original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java Thu Dec 27 20:50:17 2012
@@ -358,18 +358,18 @@ public class TarArchiveOutputStreamTest 
         TarArchiveEntry t = new TarArchiveEntry(n);
         t.setSize(10 * 1024);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        TarArchiveOutputStream tos = new TarArchiveOutputStream(bos);
+        TarArchiveOutputStream tos = new TarArchiveOutputStream(bos, "ASCII");
         tos.setLongFileMode(mode);
         tos.putArchiveEntry(t);
         tos.write(new byte[10 * 1024]);
         tos.closeArchiveEntry();
+        tos.close();
         byte[] data = bos.toByteArray();
         TarArchiveInputStream tin =
             new TarArchiveInputStream(new ByteArrayInputStream(data));
         TarArchiveEntry e = tin.getNextTarEntry();
         assertEquals(n, e.getName());
         tin.close();
-        tos.close();
     }
 
 }