commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1170505 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java test/java/org/apache/commons/compress/archivers/DumpTestCase.java
Date Wed, 14 Sep 2011 10:00:02 GMT
Author: bodewig
Date: Wed Sep 14 10:00:02 2011
New Revision: 1170505

URL: http://svn.apache.org/viewvc?rev=1170505&view=rev
Log:
Fix dump stream detection based on magic value - 24 is the offset used inside my Ubuntu Linux
magic file and seems to work for the example archives.  COMPRESS-132

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java?rev=1170505&r1=1170504&r2=1170505&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
Wed Sep 14 10:00:02 2011
@@ -508,7 +508,7 @@ public class DumpArchiveInputStream exte
 
         // this will work in a pinch.
         return DumpArchiveConstants.NFS_MAGIC == DumpArchiveUtil.convert32(buffer,
-            7);
+            24);
     }
 
     private class CountingStream extends FilterInputStream {

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java?rev=1170505&r1=1170504&r2=1170505&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/DumpTestCase.java
Wed Sep 14 10:00:02 2011
@@ -74,11 +74,11 @@ public final class DumpTestCase extends 
         }
     }
 
-    public void YtestArchiveDetection() throws Exception {
+    public void testArchiveDetection() throws Exception {
         archiveDetection(getFile("bla.dump"));
     }
 
-    public void YtestCompressedArchiveDetection() throws Exception {
+    public void testCompressedArchiveDetection() throws Exception {
         archiveDetection(getFile("bla.z.dump"));
     }
 



Mime
View raw message