From bdc3d0b544afdd4c127f46346e093a2442a46ebc Mon Sep 17 00:00:00 2001 From: Nikolay Pultsin Date: Sat, 14 Apr 2012 00:53:46 +0200 Subject: [PATCH] no exception in DeflatingDecompressor --- src/org/amse/ys/zip/DeflatingDecompressor.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/org/amse/ys/zip/DeflatingDecompressor.java b/src/org/amse/ys/zip/DeflatingDecompressor.java index b7de16263..575c8e7bd 100644 --- a/src/org/amse/ys/zip/DeflatingDecompressor.java +++ b/src/org/amse/ys/zip/DeflatingDecompressor.java @@ -74,12 +74,8 @@ class DeflatingDecompressor extends Decompressor { fillOutBuffer(); } if (myOutBufferLength == 0) { - if (myInflatorId != -1) { - throw new ZipException("cannot read from zip"); - } else { - len -= toFill; - break; - } + len -= toFill; + break; } final int ready = (toFill < myOutBufferLength) ? toFill : myOutBufferLength; if (b != null) { @@ -107,12 +103,8 @@ class DeflatingDecompressor extends Decompressor { fillOutBuffer(); } if (myOutBufferLength == 0) { - if (myInflatorId != -1) { - throw new ZipException("cannot read from zip"); - } else { - myAvailable = 0; - return -1; - } + myAvailable = 0; + return -1; } --myAvailable; --myOutBufferLength;