On 19 April 2011 06:39, <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]