Commit 28a8851e by Tom Tromey Committed by Tom Tromey

* java/io/BufferedWriter.java (localFlush): Don't synchronize.

From-SVN: r46435
parent 635559ab
2001-10-23 Tom Tromey <tromey@redhat.com>
* java/io/BufferedWriter.java (localFlush): Don't synchronize.
2001-10-23 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 2001-10-23 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* prims.cc (_Jv_Abort): Always print error message using fprintf, * prims.cc (_Jv_Abort): Always print error message using fprintf,
......
...@@ -216,15 +216,13 @@ public class BufferedWriter extends Writer ...@@ -216,15 +216,13 @@ public class BufferedWriter extends Writer
} }
} }
// This should only be called with the lock held.
private final void localFlush () throws IOException private final void localFlush () throws IOException
{ {
if (count > 0) if (count > 0)
{ {
synchronized (lock) out.write(buffer, 0, count);
{ count = 0;
out.write(buffer, 0, count);
count = 0;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment