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:
committed by
Bryce McKinlay
parent
b4ffdef7aa
commit
8246c7784b
@@ -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;
|
||||
|
||||
@@ -72,7 +72,7 @@ public abstract class FilterWriter extends Writer
|
||||
*/
|
||||
protected FilterWriter(Writer out)
|
||||
{
|
||||
super(out);
|
||||
super(out.lock);
|
||||
this.out = out;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user