summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-15 14:02:37 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-15 14:02:37 +0000
commitfc2ed4c70573a5848c72e7b163671b5c164635ca (patch)
treea634bf2ea252b6868be619219a02042b257a6544 /libjava
parent93d5c37fef2b33305c13655394c767646d3c40df (diff)
downloadgcc-fc2ed4c70573a5848c72e7b163671b5c164635ca.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72519 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/java/util/zip/InflaterInputStream.java14
2 files changed, 16 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 5ad23895a70..2a439c1fd2e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,11 @@
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,
java/text/CharacterIterator.java: Reformated.
diff --git a/libjava/java/util/zip/InflaterInputStream.java b/libjava/java/util/zip/InflaterInputStream.java
index 8ee88e5f11c..597ed6bee5b 100644
--- a/libjava/java/util/zip/InflaterInputStream.java
+++ b/libjava/java/util/zip/InflaterInputStream.java
@@ -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