]> gcc.gnu.org Git - gcc.git/commitdiff
PrintStream (PrintStream): Fix illegal usage of "this" before "super".
authorBryce McKinlay <bryce@albatross.co.nz>
Mon, 1 Nov 1999 01:15:37 +0000 (01:15 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Mon, 1 Nov 1999 01:15:37 +0000 (01:15 +0000)
1999-11-01  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/io/PrintStream (PrintStream): Fix illegal usage of "this"
          before "super".
        * java/io/OutputStreamWriter (OutputStreamWriter): ditto.
        * java/io/InputStreamReader (InputStreamReader): ditto.

From-SVN: r30300

libjava/ChangeLog
libjava/java/io/InputStreamReader.java
libjava/java/io/OutputStreamWriter.java
libjava/java/io/PrintStream.java

index 0d5c0302984377c2800e3e684a566372ed98bd79..fb71da38449e5c99c709d787de0edd8bb16e2798 100644 (file)
@@ -1,3 +1,10 @@
+1999-11-01  Bryce McKinlay  <bryce@albatross.co.nz>
+
+       * java/io/PrintStream (PrintStream): Fix illegal usage of "this" 
+         before "super".
+       * java/io/OutputStreamWriter (OutputStreamWriter): ditto.
+       * java/io/InputStreamReader (InputStreamReader): ditto.
+
 1999-10-22  Tom Tromey  <tromey@cygnus.com>
 
        * Makefile.in: Rebuilt.
index ae5e2c7b0eb016f13d6e2f7130ed1f6745997e67..f8f5dec4e368852a2ad772238ae5a7d6e774f31a 100644 (file)
@@ -44,9 +44,11 @@ public class InputStreamReader extends Reader
 
   private InputStreamReader(InputStream in, BytesToUnicode decoder)
   {
-    super((this.in = (in instanceof BufferedInputStream
-                     ? (BufferedInputStream) in
-                     : new BufferedInputStream(in, 250))));
+    this.in = in instanceof BufferedInputStream
+              ? (BufferedInputStream) in
+              : new BufferedInputStream(in, 250);
+    /* Don't need to call super(in) here as long as the lock gets set. */
+    this.lock = in;
     converter = decoder;
     converter.setInput(this.in.buf, 0, 0);
   }
index 88841d9c1b4b9943712006d0604f655bea8ce3a8..23a974e53da07c740ced04061d90c2631e8efb9b 100644 (file)
@@ -32,11 +32,13 @@ public class OutputStreamWriter extends Writer
 
   private OutputStreamWriter(OutputStream out, UnicodeToBytes encoder)
   {
-    super((this.out = (out instanceof BufferedOutputStream
-                      ? (BufferedOutputStream) out
-                      : new BufferedOutputStream(out, 250))));
+    this.out = out instanceof BufferedOutputStream 
+              ? (BufferedOutputStream) out
+              : new BufferedOutputStream(out, 250);
+    /* Don't need to call super(out) here as long as the lock gets set. */
+    this.lock = out;
     this.converter = encoder;
-  } 
+  }
 
   public OutputStreamWriter(OutputStream out, String enc)
    throws UnsupportedEncodingException
index f13d9f318bd4fbb38ebe1eb696ec96c3147de3fb..f024a69a0ed6644cf1f93f5432b6ec415f7334f5 100644 (file)
@@ -238,9 +238,16 @@ public class PrintStream extends FilterOutputStream
 
   public PrintStream (OutputStream out, boolean af)
   {
-    super ((this.out = (out instanceof BufferedOutputStream
-                        ? (BufferedOutputStream) out
-                        : new BufferedOutputStream(out, 250))));
+    super(out);
+    if (out instanceof BufferedOutputStream)
+      this.out = (BufferedOutputStream) out;
+    else
+      {
+        this.out = new BufferedOutputStream(out, 250);
+       /* PrintStream redefines "out". Explicitly reset FilterOutputStream's
+        * "out" so that they're referring to the same thing. */
+       super.out = this.out;    
+      }
     converter = UnicodeToBytes.getDefaultEncoder();
     error = false;
     auto_flush = af;
This page took 0.075474 seconds and 5 git commands to generate.