BufferedWriter.java (BufferedWriter): Use existing lock of chained Writer when callin...
authorBryce McKinlay <mckinlay@redhat.com>
Tue, 20 Jul 2004 15:51:11 +0000 (15:51 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 20 Jul 2004 15:51:11 +0000 (16:51 +0100)
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

libjava/ChangeLog
libjava/java/io/BufferedWriter.java
libjava/java/io/FilterWriter.java
libjava/java/io/PrintWriter.java

index 07810e4756008a37827ec8ffe99a275a0adfd9e6..338b45e68bd7fa8080aa8d15862e8a428801dab8 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2004-07-19  Bryce McKinlay  <mckinlay@redhat.com>
 
        * prims.cc (process_gcj_properties): Don't increment i within LHS
index 009bdccc144fa47ea7265081b71b5376b753146d..4beb5c541980b936495bbfe931373eed194ecabd 100644 (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;
index 87bae4f0bd8cf01775a389c5e5742380daf6b1a7..a717092d8590604e1f5e3cc15e53baad87d0d8f8 100644 (file)
@@ -72,7 +72,7 @@ public abstract class FilterWriter extends Writer
     */
   protected FilterWriter(Writer out)
   {
-    super(out);
+    super(out.lock);
     this.out = out;
   }
 
index 9358ddaea5dba05c7f631cb5095b4bcd272da540..376b3c44e7b683492dfd47dd53564e7f45f5b1a1 100644 (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;
   }