commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1650873 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Date Sun, 11 Jan 2015 05:32:00 GMT
Author: bodewig
Date: Sun Jan 11 05:32:00 2015
New Revision: 1650873

URL: http://svn.apache.org/r1650873
Log:
make closed flag volatile as suggested by Dawid Weiss - COMPRESS-297

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=1650873&r1=1650872&r2=1650873&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
Sun Jan 11 05:32:00 2015
@@ -134,7 +134,7 @@ public class ZipFile implements Closeabl
     /**
      * Whether the file is closed.
      */
-    private boolean closed = true;
+    private volatile boolean closed = true;
 
     // cached buffers - must only be used locally in the class (COMPRESS-172 - reduce garbage
collection)
     private final byte[] DWORD_BUF = new byte[DWORD];



Mime
View raw message