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: COMPRESS-271 only write content hash when requested
Date Tue, 07 Feb 2017 19:37:09 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master a0e27b5a4 -> a5f7089f6


COMPRESS-271 only write content hash when requested


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

Branch: refs/heads/master
Commit: 4355b00e5094a3979b73ddb62b23048fc3ea7312
Parents: a0e27b5
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Tue Feb 7 20:36:01 2017 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Tue Feb 7 20:36:01 2017 +0100

----------------------------------------------------------------------
 .../compressors/lz4/FramedLZ4CompressorOutputStream.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/4355b00e/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
index f80724f..991f963 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
@@ -245,7 +245,9 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream
{
 
     private void writeTrailer() throws IOException {
         out.write(END_MARK);
-        ByteUtils.toLittleEndian(out, contentHash.getValue(), 4);
+        if (params.withContentChecksum) {
+            ByteUtils.toLittleEndian(out, contentHash.getValue(), 4);
+        }
     }
 
 }


Mime
View raw message