Continuing the Classpath-Kaffe merge, I noticed that DataInputStream is failing one of kaffe's regression test (InputStreamTest). It seems the failure comes from readLine(): readLine() is a little too conservative compared to JDK's implementation. The real behaviour seems to be the following:
readLine() is invoked => it reads bytes until it finds a '\r' => it reads the next byte
* if it is a '\n' it eats it
* if it isn't it keeps it in an internal buffer until someone calls another read methods.
But in any case the byte isn't put back in the input buffer. The real problem is what happens when someone calls one of the inherited method from FilterInputStream which are not overloaded (e.g. available).
Kaffe's answer was to create a mini-buffer with default access in FilterInputStream. It is obvious it is clumsy because it slightly changes the API, but the only other option would be to overload all read functions.
So what's your opinion for Classpath ?
Regards, Guilhem.
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

