You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2018/04/22 18:18:18 UTC

commons-compress git commit: COMPRESS-445 fix stats for Stored entries in ZipArchiveInputStream

Repository: commons-compress
Updated Branches:
  refs/heads/master 36a5631eb -> be86c6236


COMPRESS-445 fix stats for Stored entries in ZipArchiveInputStream


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

Branch: refs/heads/master
Commit: be86c6236d4cbea207f3a4924687a0bbd99af360
Parents: 36a5631
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sun Apr 22 20:17:33 2018 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Apr 22 20:17:33 2018 +0200

----------------------------------------------------------------------
 .../commons/compress/archivers/zip/ZipArchiveInputStream.java      | 2 +-
 .../java/org/apache/commons/compress/archivers/ZipTestCase.java    | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/be86c623/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 f1789f6..20caa31 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
@@ -478,7 +478,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
     @Override
     public long getCompressedCount() {
         if (current.entry.getMethod() == ZipArchiveOutputStream.STORED) {
-            return current.bytesReadFromStream;
+            return current.bytesRead;
         } else if (current.entry.getMethod() == ZipArchiveOutputStream.DEFLATED) {
             return getBytesInflated();
         } else if (current.entry.getMethod() == ZipMethod.UNSHRINKING.getCode()) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/be86c623/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
index fc98824..5211a90 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
@@ -631,7 +631,6 @@ public final class ZipTestCase extends AbstractTestCase {
     }
 
     @Test
-    @org.junit.Ignore("result from ZipArchiveInputStream is wrong")
     public void inputStreamStatisticsForStoredEntry() throws IOException, ArchiveException {
         Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("test.txt", Arrays.asList(5L, 5L));