From e42b522040644e919e4da4c9a10edcec01ae847e Mon Sep 17 00:00:00 2001 From: bryce Date: Wed, 29 Nov 2000 10:06:03 +0000 Subject: * java/util/zip/InflaterInputStream (read): Don't return -1 unless the infate() call didn't deliver any output. Throw a ZipException if the needsDictionary() call returns true. * java/io/ByteArrayInputStream (read): Remove redundant bounds checks. * java/io/InputStreamReader: Use the default buffer size for the contained BufferedInputStream. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37846 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/io/ByteArrayInputStream.java | 7 ------- 1 file changed, 7 deletions(-) (limited to 'libjava/java/io/ByteArrayInputStream.java') diff --git a/libjava/java/io/ByteArrayInputStream.java b/libjava/java/io/ByteArrayInputStream.java index 97ec6e79818..30ba8d7f9da 100644 --- a/libjava/java/io/ByteArrayInputStream.java +++ b/libjava/java/io/ByteArrayInputStream.java @@ -72,9 +72,6 @@ public class ByteArrayInputStream extends InputStream public synchronized int read() { - if (pos < 0) - throw new ArrayIndexOutOfBoundsException(pos); - if (pos < count) return ((int) buf[pos++]) & 0xFF; return -1; @@ -82,10 +79,6 @@ public class ByteArrayInputStream extends InputStream public synchronized int read(byte[] b, int off, int len) { - /* Don't need to check pos value, arraycopy will check it. */ - if (off < 0 || len < 0 || off + len > b.length) - throw new ArrayIndexOutOfBoundsException(); - if (pos >= count) return -1; -- cgit v1.2.3