BufferedWriter.java (BufferedWriter): Use existing lock of chained Writer when calling super-constructor.

2004-07-20  Bryce McKinlay  <mckinlay@redhat.com>

	* java/io/BufferedWriter.java (BufferedWriter): Use existing lock
	of chained Writer when calling super-constructor.
	* java/io/FilterWriter.java (FilterWriter): Likewise.
	* java/io/PrintWriter.java (PrintWriter): Likewise.

From-SVN: r84959
This commit is contained in:
Bryce McKinlay
2004-07-20 15:51:11 +00:00
committed by Bryce McKinlay
parent b4ffdef7aa
commit 8246c7784b
4 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ public class BufferedWriter extends Writer
*/
public BufferedWriter (Writer out, int size)
{
super(out);
super(out.lock);
this.out = out;
this.buffer = new char[size];
this.count = 0;
+1 -1
View File
@@ -72,7 +72,7 @@ public abstract class FilterWriter extends Writer
*/
protected FilterWriter(Writer out)
{
super(out);
super(out.lock);
this.out = out;
}
+2 -2
View File
@@ -86,7 +86,7 @@ public class PrintWriter extends Writer
*/
public PrintWriter(Writer wr)
{
super(wr);
super(wr.lock);
this.out = wr;
}
@@ -102,7 +102,7 @@ public class PrintWriter extends Writer
*/
public PrintWriter(Writer wr, boolean autoflush)
{
super(wr);
super(wr.lock);
this.out = wr;
this.autoflush = autoflush;
}