Hi!

Here, the proposed changes of PrintStream are:
1. to be closer to the RI behavior (see changes for line_separator, 
out.flush(), append());
2. some code optimizations (like removal of writeChars() pos/len parameters).

ChangeLog entries:
        * java/io/PrintStream.java (line_separator): Convert static field to
        an instance one (to match the RI functionality).
        * java/io/PrintStream.java (error_occurred): Remove an unnecessary
        initialization to false.
        * java/io/PrintStream.java (PrintStream): Use
        "new FileOutputStream(fileName)" instead of
        "new FileOutputStream(new File(fileName))".
        * java/io/PrintStream.java (PrintStream): Throw NPE if out is null.
        * java/io/PrintStream.java (writeChars, print, println): Don't pass
        "pos" and "len" parameters to writeChars() (as they are always set
        to 0 and buf.length, respectively).
        * java/io/PrintStream.java (print): Call out.flush() only if needed
        (to match the RI).
        * java/io/PrintStream.java (lastIndexOfNewLine): New private static
        method (called from print() only).
        * java/io/PrintStream.java (write): Remove unnecessary "&" operation.
        * java/io/PrintStream.java (print, write): Directly call out.flush()
        instead of flush() (the same as in the RI).
        * java/io/PrintStream.java (append): Call subSequence() also for
        "null" string (the same as in the RI).

Attachment: classpath-ivmai-12.diff
Description: Binary data

Reply via email to