[kaffe] RandomAccessFile causes StackOverflowError
Ito Kazumitsu
ito.kazumitsu at hitachi-cable.co.jp
Thu Mar 27 19:37:01 PST 2003
In message "[kaffe] RandomAccessFile causes StackOverflowError"
on 03/03/28, Ito Kazumitsu <ito.kazumitsu at hitachi-cable.co.jp> writes:
> The attached program causes StackOverflowError when run with
> kaffe (Version: 1.1.x-cvs,
> ChangeLog head: 2003-03-14 Tim Stack <stack at cs.utah.edu>).
And here is a patch.
--- java/io/RandomAccessFile.java.orig Fri Nov 29 01:50:21 2002
+++ java/io/RandomAccessFile.java Fri Mar 28 12:30:43 2003
@@ -55,10 +55,14 @@
native public int read() throws IOException;
public int read(byte b[]) throws IOException {
- return read(b, 0, b.length);
+ return _read(b, 0, b.length);
}
public int read(byte b[], int off, int len) throws IOException {
+ return _read(b, off, len);
+}
+
+private int _read(byte b[], int off, int len) throws IOException {
int total = 0;
while (total < len) {
final int got = readBytes(b, off + total, len - total);
More information about the kaffe
mailing list