commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1094857 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Date Tue, 19 Apr 2011 11:03:46 GMT
On 19 April 2011 06:39,  <bodewig@apache.org> wrote:
> Author: bodewig
> Date: Tue Apr 19 05:39:38 2011
> New Revision: 1094857
>
> URL: http://svn.apache.org/viewvc?rev=1094857&view=rev
> Log:
> don't warn in finalize if the constructor throws an exception and the user can not call
close at all - happens in Maven221MultiVolumeTest's testRead7Zip... method
>
> Modified:
>    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
>
> Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
> URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java?rev=1094857&r1=1094856&r2=1094857&view=diff
> ==============================================================================
> --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
(original)
> +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Tue Apr 19 05:39:38 2011
> @@ -198,6 +198,7 @@ public class ZipFile {
>         } finally {
>             if (!success) {
>                 try {
> +                    closed = true;
>                     archive.close();

Possibly should call close() here insted of duplicating its code?

>                 } catch (IOException e2) {
>                     // swallow, throw the original exception instead
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message