In message "[kaffe] RandomAccessFile causes StackOverflowError"
    on 03/03/28, Ito Kazumitsu <[EMAIL PROTECTED]> writes:

> The attached program causes StackOverflowError when run with
> kaffe (Version: 1.1.x-cvs,
>  ChangeLog head: 2003-03-14 Tim Stack <[EMAIL PROTECTED]>).

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);

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to