PrintStream (PrintStream): Fix illegal usage of "this" before "super".

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
This commit is contained in:
Bryce McKinlay 1999-11-01 01:15:37 +00:00 committed by Bryce McKinlay
parent 14a774a9d2
commit 6b5ba2ce34
4 changed files with 28 additions and 10 deletions

View 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;