commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [1/2] commons-compress git commit: flag false positive
Date Tue, 20 Dec 2016 14:40:29 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master 2b5ba89b7 -> 85184c3a8


flag false positive


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

Branch: refs/heads/master
Commit: ce6c33a2bb74d3faa76fce1c816dda24cee495fb
Parents: 2b5ba89
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Tue Dec 20 15:35:52 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Tue Dec 20 15:35:52 2016 +0100

----------------------------------------------------------------------
 .../commons/compress/archivers/zip/ZipArchiveOutputStream.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/ce6c33a2/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
index 8ff10c0..e3066b0 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -292,7 +292,8 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
                 EnumSet.of(StandardOpenOption.CREATE, StandardOpenOption.WRITE,
                            StandardOpenOption.READ,
                            StandardOpenOption.TRUNCATE_EXISTING));
-            _streamCompressor = StreamCompressor.create(_channel, def);
+            // will never get opened properly when an exception is thrown so doesn't need
to get closed
+            _streamCompressor = StreamCompressor.create(_channel, def); //NOSONAR
         } catch (final IOException e) {
             IOUtils.closeQuietly(_channel);
             _channel = null;


Mime
View raw message