commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject commons-compress git commit: false positives
Date Tue, 20 Dec 2016 15:25:13 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master ea35f646a -> bf88f6dbb


false positives


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

Branch: refs/heads/master
Commit: bf88f6dbb380f6b340404ab5d2785a90ef7b3324
Parents: ea35f64
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Tue Dec 20 16:09:40 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Tue Dec 20 16:09:40 2016 +0100

----------------------------------------------------------------------
 .../commons/compress/archivers/zip/ParallelScatterZipCreator.java | 3 ++-
 .../commons/compress/archivers/zip/ScatterZipOutputStream.java    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/bf88f6db/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 61a241e..dc14499 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
@@ -74,7 +74,8 @@ public class ParallelScatterZipCreator {
     private ScatterZipOutputStream createDeferred(final ScatterGatherBackingStoreSupplier
scatterGatherBackingStoreSupplier)
             throws IOException {
         final ScatterGatherBackingStore bs = scatterGatherBackingStoreSupplier.get();
-        final StreamCompressor sc = StreamCompressor.create(Deflater.DEFAULT_COMPRESSION,
bs);
+        // lifecycle is bound to the ScatterZipOutputStream returned
+        final StreamCompressor sc = StreamCompressor.create(Deflater.DEFAULT_COMPRESSION,
bs); //NOSONAR
         return new ScatterZipOutputStream(bs, sc);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/bf88f6db/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
b/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
index 7e3bae0..7076e2a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
@@ -149,7 +149,8 @@ public class ScatterZipOutputStream implements Closeable {
      */
     public static ScatterZipOutputStream fileBased(final File file, final int compressionLevel)
throws FileNotFoundException {
         final ScatterGatherBackingStore bs = new FileBasedScatterGatherBackingStore(file);
-        final StreamCompressor sc = StreamCompressor.create(compressionLevel, bs);
+        // lifecycle is bound to the ScatterZipOutputStream returned
+        final StreamCompressor sc = StreamCompressor.create(compressionLevel, bs); //NOSONAR
         return new ScatterZipOutputStream(bs, sc);
     }
 }


Mime
View raw message