You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2017/11/25 15:57:19 UTC

[1/2] commons-compress git commit: COMPRESS-430: Synchronize iteration of synchronized list

Repository: commons-compress
Updated Branches:
  refs/heads/master 10ff1c341 -> 78cb9bf36


COMPRESS-430: Synchronize iteration of synchronized list


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/ff0e8420
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/ff0e8420
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/ff0e8420

Branch: refs/heads/master
Commit: ff0e842058091b3310340f51a130a65a1cf6f725
Parents: 10ff1c3
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Authored: Sat Nov 25 22:57:30 2017 +1300
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sat Nov 25 16:54:51 2017 +0100

----------------------------------------------------------------------
 .../compress/archivers/zip/ParallelScatterZipCreator.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/ff0e8420/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java b/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
index dc14499..9513da2 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
@@ -246,9 +246,11 @@ public class ParallelScatterZipCreator {
         // It is important that all threads terminate before we go on, ensure happens-before relationship
         compressionDoneAt = System.currentTimeMillis();
 
-        for (final ScatterZipOutputStream scatterStream : streams) {
-            scatterStream.writeTo(targetStream);
-            scatterStream.close();
+        synchronized (streams) {
+            for (final ScatterZipOutputStream scatterStream : streams) {
+                scatterStream.writeTo(targetStream);
+                scatterStream.close();
+            }
         }
 
         scatterDoneAt = System.currentTimeMillis();


[2/2] commons-compress git commit: record fix for COMPRESS-430

Posted by bo...@apache.org.
record fix for COMPRESS-430

closes #57


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/78cb9bf3
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/78cb9bf3
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/78cb9bf3

Branch: refs/heads/master
Commit: 78cb9bf36dab81e15887f451fbc964cf57e94739
Parents: ff0e842
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sat Nov 25 16:56:41 2017 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sat Nov 25 16:56:41 2017 +0100

----------------------------------------------------------------------
 src/changes/changes.xml | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/78cb9bf3/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 2a94f16..9bd0a52 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -52,6 +52,10 @@ The <action> type attribute can be add,update,fix,remove.
       <action issue="COMPRESS-425" type="add" date="2017-10-22">
         Added auto-detection for Zstandard compressed streams.
       </action>
+      <action issue="COMPRESS-430" type="fix" date="2017-11-25"
+              due-to="Bruno P. Kinoshita">
+        Synchronized iteration over a synchronizedList in ParallelScatterZipCreator.
+      </action>
     </release>
     <release version="1.15" date="2017-10-17"
              description="Release 1.15