whitespace
Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/5417fb4e Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/5417fb4e Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/5417fb4e Branch: refs/heads/master Commit: 5417fb4ec02113ddcf7435ea3a48be8b8ae4d3cc Parents: 2f75fbb Author: Stefan Bodewig <bode...@apache.org> Authored: Sun Nov 18 17:00:44 2018 +0100 Committer: Stefan Bodewig <bode...@apache.org> Committed: Sun Nov 18 17:00:44 2018 +0100 ---------------------------------------------------------------------- .../zip/ParallelScatterZipCreator.java | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/5417fb4e/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 f2a1679..bd5a561 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 @@ -240,28 +240,28 @@ public class ParallelScatterZipCreator { throws IOException, InterruptedException, ExecutionException { try { - // Make sure we catch any exceptions from parallel phase - try { - for (final Future<?> future : futures) { - future.get(); + // Make sure we catch any exceptions from parallel phase + try { + for (final Future<?> future : futures) { + future.get(); + } + } finally { + es.shutdown(); } - } finally { - es.shutdown(); - } - es.awaitTermination(1000 * 60L, TimeUnit.SECONDS); // == Infinity. We really *must* wait for this to complete + es.awaitTermination(1000 * 60L, TimeUnit.SECONDS); // == Infinity. We really *must* wait for this to complete - // It is important that all threads terminate before we go on, ensure happens-before relationship - compressionDoneAt = System.currentTimeMillis(); + // It is important that all threads terminate before we go on, ensure happens-before relationship + compressionDoneAt = System.currentTimeMillis(); - synchronized (streams) { - 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(); + scatterDoneAt = System.currentTimeMillis(); } finally { ensureStreamsAreClosed(); }