You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/04/09 09:55:43 UTC
commons-compress git commit: These static fields should be accessed
directly.
Repository: commons-compress
Updated Branches:
refs/heads/master 999821c25 -> ab85f00b6
These static fields should be accessed directly.
Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/ab85f00b
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/ab85f00b
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/ab85f00b
Branch: refs/heads/master
Commit: ab85f00b6d327907ee23291979a6998c54cf88ad
Parents: 999821c
Author: ggregory <gg...@apache.org>
Authored: Sat Apr 9 00:55:39 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Sat Apr 9 00:55:39 2016 -0700
----------------------------------------------------------------------
.../apache/commons/compress/archivers/zip/StreamCompressor.java | 5 +++--
.../commons/compress/archivers/zip/ZipArchiveInputStream.java | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-compress/blob/ab85f00b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
index 8e12e64..f1c810e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
@@ -26,6 +26,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.CRC32;
import java.util.zip.Deflater;
+import java.util.zip.ZipEntry;
/**
* Encapsulates a {@link Deflater} and crc calculator, handling multiple types of output streams.
@@ -168,7 +169,7 @@ public abstract class StreamCompressor implements Closeable {
while ((length = source.read(readerBuf, 0, readerBuf.length)) >= 0) {
write(readerBuf, 0, length, method);
}
- if (method == ZipArchiveEntry.DEFLATED) {
+ if (method == ZipEntry.DEFLATED) {
flushDeflater();
}
}
@@ -186,7 +187,7 @@ public abstract class StreamCompressor implements Closeable {
long write(byte[] b, int offset, int length, int method) throws IOException {
long current = writtenToOutputStreamForLastEntry;
crc.update(b, offset, length);
- if (method == ZipArchiveEntry.DEFLATED) {
+ if (method == ZipEntry.DEFLATED) {
writeDeflated(b, offset, length);
} else {
writeCounted(b, offset, length);
http://git-wip-us.apache.org/repos/asf/commons-compress/blob/ab85f00b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
index 584aa4a..f8df66b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
@@ -305,7 +305,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream {
processZip64Extra(size, cSize);
- if (current.entry.getCompressedSize() != ZipArchiveEntry.SIZE_UNKNOWN) {
+ if (current.entry.getCompressedSize() != ArchiveEntry.SIZE_UNKNOWN) {
if (current.entry.getMethod() == ZipMethod.UNSHRINKING.getCode()) {
current.in = new UnshrinkingInputStream(new BoundedInputStream(in, current.entry.getCompressedSize()));
} else if (current.entry.getMethod() == ZipMethod.IMPLODING.getCode()) {