From: <pj...@us...> - 2009-08-26 04:19:58
|
Revision: 6719 http://jython.svn.sourceforge.net/jython/?rev=6719&view=rev Author: pjenvey Date: 2009-08-26 04:19:39 +0000 (Wed, 26 Aug 2009) Log Message: ----------- always flush the raw io, even when nothing is buffered Modified Paths: -------------- trunk/jython/src/org/python/core/io/BufferedWriter.java Modified: trunk/jython/src/org/python/core/io/BufferedWriter.java =================================================================== --- trunk/jython/src/org/python/core/io/BufferedWriter.java 2009-08-25 07:59:28 UTC (rev 6718) +++ trunk/jython/src/org/python/core/io/BufferedWriter.java 2009-08-26 04:19:39 UTC (rev 6719) @@ -72,16 +72,13 @@ /** {@inheritDoc} */ public void flush() { - if (buffer.position() == 0) { - // Empty buffer - return; + if (buffer.position() > 0) { + buffer.flip(); + while (buffer.hasRemaining()) { + rawIO.write(buffer); + } + buffer.clear(); } - - buffer.flip(); - while (buffer.hasRemaining()) { - rawIO.write(buffer); - } - buffer.clear(); super.flush(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |