diff --git a/classpath/java/io/ByteArrayInputStream.java b/classpath/java/io/ByteArrayInputStream.java index 828db99722..56be302f76 100644 --- a/classpath/java/io/ByteArrayInputStream.java +++ b/classpath/java/io/ByteArrayInputStream.java @@ -20,7 +20,7 @@ public class ByteArrayInputStream extends InputStream { } public int read(byte[] buffer, int offset, int bufferLength) { - if (position < length) { + if (position >= length) { return -1; } int remaining = length-position;