From: Tom Tromey Date: Wed, 23 Jun 1999 14:57:14 +0000 (+0000) Subject: InflaterInputStream.java (read): Throw ZipException if inflater throws a DataFormatEx... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34043bd2e9ad8e2c582e5893838d9694e1796998;p=gcc.git InflaterInputStream.java (read): Throw ZipException if inflater throws a DataFormatException. * java/util/zip/InflaterInputStream.java (read): Throw ZipException if inflater throws a DataFormatException. From-SVN: r27719 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1581108c239..9bd18425884 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +1999-06-23 Tom Tromey + + * java/util/zip/InflaterInputStream.java (read): Throw + ZipException if inflater throws a DataFormatException. + 1999-06-23 Warren Levy * java/net/DatagramSocketImpl.java (localPort): Fixed typo to match JDK. diff --git a/libjava/java/util/zip/InflaterInputStream.java b/libjava/java/util/zip/InflaterInputStream.java index 7ee445560f4..74712478784 100644 --- a/libjava/java/util/zip/InflaterInputStream.java +++ b/libjava/java/util/zip/InflaterInputStream.java @@ -67,7 +67,14 @@ public class InflaterInputStream extends FilterInputStream fill (); if (inf.needsDictionary()) return -1; - return inf.inflate(buf, off, len); + try + { + return inf.inflate(buf, off, len); + } + catch (DataFormatException dfe) + { + throw new ZipException (dfe.getMessage()); + } } public long skip (long n) throws IOException