DataInputStream.readLine() patch

Urban Widmark urban@svenskatest.se
Sun Apr 11 08:31:00 GMT 1999


Hello Warren

I have a small problem with the deprecated method DataInputStream.readLine
(and since your name was on the file ...)

The method believes every empty line is end of file, and returns null when
no characters where found, not when no characters where found before end
of file.

"Returns:
    the next line of text from this input stream, or null if no bytes are
    read before end-of-file is reached."
http://www.javasoft.com/products/jdk/1.1/docs/api/java.io.DataInputStream.html#readLine ()

The behaviour has been compared with jdk1.1.7_v1a for Linux (and I _know_
this is how readLine should work).


ChangeLog:
1999-04-11  Urban Widmark <urban@svenskatest.se>
	* java/io/DataInputStream.java (readLine): Corrected handling of
	empty lines, from null to ""

I hope the diff and the ChangeLog entry are in the specified format.
Feel free to edit as necessary.

/Urban

---
Urban Widmark                           urban@svenskatest.se
Svenska Test AB                         +46 90 71 71 23


More information about the Java mailing list