commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r760749 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/AbstractTestCase.java
Date Wed, 01 Apr 2009 00:50:51 GMT
Author: sebb
Date: Wed Apr  1 00:50:51 2009
New Revision: 760749

URL: http://svn.apache.org/viewvc?rev=760749&view=rev
Log:
Handle tar files specially since match() does not work.

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/AbstractTestCase.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/AbstractTestCase.java?rev=760749&r1=760748&r2=760749&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/AbstractTestCase.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/AbstractTestCase.java
Wed Apr  1 00:50:51 2009
@@ -239,7 +239,10 @@
         final InputStream is = new FileInputStream(archive);
         try {
             final BufferedInputStream buf = new BufferedInputStream(is);
-            final ArchiveInputStream in = factory.createArchiveInputStream(buf);
+            final ArchiveInputStream in =
+                archive.getName().endsWith(".tar") ? // tar does not autodetect at present
+                    factory.createArchiveInputStream("tar", buf) :        
+                    factory.createArchiveInputStream(buf);
             this.checkArchiveContent(in, expected);
         } finally {
             is.close();



Mime
View raw message