commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1556521 - in /commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2: archivers/ArchiveOutput.java formats/ar/ArArchiveOutput.java
Date Wed, 08 Jan 2014 12:58:35 GMT
Author: bodewig
Date: Wed Jan  8 12:58:34 2014
New Revision: 1556521

URL: http://svn.apache.org/r1556521
Log:
putEntry closes the previous entry, why shouldn't finish do so as well?

Modified:
    commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/archivers/ArchiveOutput.java
    commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java

Modified: commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/archivers/ArchiveOutput.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/archivers/ArchiveOutput.java?rev=1556521&r1=1556520&r2=1556521&view=diff
==============================================================================
--- commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/archivers/ArchiveOutput.java
(original)
+++ commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/archivers/ArchiveOutput.java
Wed Jan  8 12:58:34 2014
@@ -69,7 +69,7 @@ public interface ArchiveOutput<A extends
      *
      * <p>Additional data can be written, if the format supports it.<p>
      * 
-     * @throws IOException if the user forgets to close the last entry.
+     * @throws IOException
      */
     void finish() throws IOException;
 

Modified: commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java?rev=1556521&r1=1556520&r2=1556521&view=diff
==============================================================================
--- commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java
(original)
+++ commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java
Wed Jan  8 12:58:34 2014
@@ -221,8 +221,8 @@ public class ArArchiveOutput extends Abs
     @Override
     public void finish() throws IOException {
         if (haveUnclosedEntry) {
-            throw new IOException("This archive contains unclosed entries.");
-        } else if(finished) {
+            closeEntry();
+        } else if (finished) {
             throw new IOException("This archive has already been finished");
         }
         finished = true;



Mime
View raw message