This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]