2003-10-15 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Wed, 15 Oct 2003 14:02:37 +0000 (14:02 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Wed, 15 Oct 2003 14:02:37 +0000 (14:02 +0000)
* java/util/zip/InflaterInputStream.java
(InflaterInputStream): Renamed infl to inf and bufsize to size,
added description to exception, check for inf == null and size < 0.

From-SVN: r72519

libjava/ChangeLog
libjava/java/util/zip/InflaterInputStream.java

index 5ad23895a70257faf7fdbd011249d805bad6532b..2a439c1fd2e6d77b0ea958538a3923366f5d475d 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-15  Michael Koch  <konqueror@gmx.de>
+
+       * java/util/zip/InflaterInputStream.java
+       (InflaterInputStream): Renamed infl to inf and bufsize to size,
+       added description to exception, check for inf == null and size < 0.
+
 2003-10-15  Michael Koch  <konqueror@gmx.de>
 
        * java/text/AttributedCharacterIterator.java,
index 8ee88e5f11c5d43450e3eaaffdb0440851b08eaf..597ed6bee5b2a6eedbe193bdc02ec2ab5ed52906 100644 (file)
@@ -70,15 +70,21 @@ public class InflaterInputStream extends FilterInputStream
     this (in, infl, 512);
   }
 
-  public InflaterInputStream (InputStream in, Inflater infl, int bufsize)
+  public InflaterInputStream (InputStream in, Inflater inf, int size)
   {
     super (in);
 
     if (in == null)
-      throw new NullPointerException();
+      throw new NullPointerException ("in may not be null");
+
+    if (inf == null)
+      throw new NullPointerException ("inf may not be null");
+    
+    if (size < 0)
+      throw new IllegalArgumentException ("size may not be negative");
     
-    this.inf = infl;
-    this.buf = new byte[bufsize];
+    this.inf = inf;
+    this.buf = new byte [size];
   }
 
   public int read () throws IOException