This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: PrintStream - Fix PR 11778
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: java-patches at gcc dot gnu dot org
- Date: Sun, 10 Aug 2003 14:53:15 +1200
- Subject: Patch: PrintStream - Fix PR 11778
I'm checking in this patch for PrintStream, which fixes PR 11778. The
problem is that flush() isnt always being called upon calls to print().
The Javadoc spec is unclear/incorrect here, but inspection of the JRE's
behaviour with a test case shows that it actually calls flush() after
every print() call - ie the pre-classpath-merge libgcj implementation
was correct.
I'm not entirely happy with our current PrintStream implementation -
there are several layers of indirection and too much synchronization
going on. The old code was better. But I decided to stick with the
current one for now in the interests of keeping things in sync with
classpath. As Michael Koch suggests, what we really want is to have the
PrintStream/PrintWriter implementations use java.nio.charset for
character conversion.
Regards
Bryce.
Attachment:
PrintStream.patch.txt
Description: Text document