commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r758809 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio: CpioArchiveInputStream.java CpioArchiveOutputStream.java CpioConstants.java
Date Thu, 26 Mar 2009 19:31:53 GMT
Author: sebb
Date: Thu Mar 26 19:31:52 2009
New Revision: 758809

URL: http://svn.apache.org/viewvc?rev=758809&view=rev
Log:
Use constant string for trailer

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java?rev=758809&r1=758808&r2=758809&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
Thu Mar 26 19:31:52 2009
@@ -193,7 +193,7 @@
         this.entryEOF = false;
         this.crc = 0;
 
-        if (this.entry.getName().equals("TRAILER!!!")) {
+        if (this.entry.getName().equals(CPIO_TRAILER)) {
             this.entryEOF = true;
             return null;
         }

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java?rev=758809&r1=758808&r2=758809&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
Thu Mar 26 19:31:52 2009
@@ -319,7 +319,7 @@
         }
         this.cpioEntry = new CpioArchiveEntry(this.entryFormat);
         this.cpioEntry.setMode(0);
-        this.cpioEntry.setName("TRAILER!!!");
+        this.cpioEntry.setName(CPIO_TRAILER);
         this.cpioEntry.setNumberOfLinks(1);
         writeHeader(this.cpioEntry);
         closeArchiveEntry();

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java?rev=758809&r1=758808&r2=758809&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
Thu Mar 26 19:31:52 2009
@@ -126,4 +126,7 @@
 
     /** On directories, restricted deletion flag. */
     final int C_ISVTX = 001000;
+    
+    /** The special trailer marker */
+    final String CPIO_TRAILER = "TRAILER!!!";
 }



Mime
View raw message