From 8246c7784b5a0aeb9d150c8fbdf2ea3c820b03bc Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Tue, 20 Jul 2004 15:51:11 +0000 Subject: [PATCH] BufferedWriter.java (BufferedWriter): Use existing lock of chained Writer when calling super-constructor. 2004-07-20 Bryce McKinlay * 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 | 7 +++++++ libjava/java/io/BufferedWriter.java | 2 +- libjava/java/io/FilterWriter.java | 2 +- libjava/java/io/PrintWriter.java | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 07810e47560..338b45e68bd 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2004-07-20 Bryce McKinlay + + * 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 * prims.cc (process_gcj_properties): Don't increment i within LHS diff --git a/libjava/java/io/BufferedWriter.java b/libjava/java/io/BufferedWriter.java index 009bdccc144..4beb5c54198 100644 --- a/libjava/java/io/BufferedWriter.java +++ b/libjava/java/io/BufferedWriter.java @@ -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; diff --git a/libjava/java/io/FilterWriter.java b/libjava/java/io/FilterWriter.java index 87bae4f0bd8..a717092d859 100644 --- a/libjava/java/io/FilterWriter.java +++ b/libjava/java/io/FilterWriter.java @@ -72,7 +72,7 @@ public abstract class FilterWriter extends Writer */ protected FilterWriter(Writer out) { - super(out); + super(out.lock); this.out = out; } diff --git a/libjava/java/io/PrintWriter.java b/libjava/java/io/PrintWriter.java index 9358ddaea5d..376b3c44e7b 100644 --- a/libjava/java/io/PrintWriter.java +++ b/libjava/java/io/PrintWriter.java @@ -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; } -- 2.30.2