diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-15 14:02:37 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-15 14:02:37 +0000 |
commit | fc2ed4c70573a5848c72e7b163671b5c164635ca (patch) | |
tree | a634bf2ea252b6868be619219a02042b257a6544 /libjava | |
parent | 93d5c37fef2b33305c13655394c767646d3c40df (diff) | |
download | gcc-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/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/java/util/zip/InflaterInputStream.java | 14 |
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 |