aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/io/PrintStream.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-05-20 11:53:11 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-05-20 11:53:11 +0000
commit669e91abfa0d4790724c482cc09b2e2c3e593824 (patch)
tree9277c22b9002ea46879f07db5568e49fc367dec4 /libjava/java/io/PrintStream.java
parent8d4d9d1911a80652dc826ea85975f2da57d4c0b5 (diff)
downloadgcc-669e91abfa0d4790724c482cc09b2e2c3e593824.zip
gcc-669e91abfa0d4790724c482cc09b2e2c3e593824.tar.gz
gcc-669e91abfa0d4790724c482cc09b2e2c3e593824.tar.bz2
2003-05-20 Michael Koch <konqueror@gmx.de>
* java/io/DataInputStream.java (convertFromUTF): Merged comment from classpath. * java/io/PrintStream.java (error_occured): Renamed from error, merged comment from classpath. (PrintStream): No need to initialized error. (checkError): Replace error with error_occurred. (setError): Likewise. From-SVN: r66997
Diffstat (limited to 'libjava/java/io/PrintStream.java')
-rw-r--r--libjava/java/io/PrintStream.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/libjava/java/io/PrintStream.java b/libjava/java/io/PrintStream.java
index 418d7f2..418eea1 100644
--- a/libjava/java/io/PrintStream.java
+++ b/libjava/java/io/PrintStream.java
@@ -81,9 +81,12 @@ public class PrintStream extends FilterOutputStream
// Work buffer of bytes where we temporarily keep converter output.
byte[] work_bytes = new byte[100];
- // True if error occurred.
- private boolean error;
- // True if auto-flush.
+ /**
+ * This boolean indicates whether or not an error has ever occurred
+ * on this stream.
+ */
+ private boolean error_occurred = false;
+
/**
* This is <code>true</code> if auto-flush is enabled,
* <code>false</code> otherwise
@@ -123,7 +126,6 @@ public class PrintStream extends FilterOutputStream
super(out);
converter = UnicodeToBytes.getDefaultEncoder();
- error = false;
this.auto_flush = auto_flush;
}
@@ -139,7 +141,7 @@ public class PrintStream extends FilterOutputStream
public boolean checkError ()
{
flush();
- return error;
+ return error_occurred;
}
/**
@@ -148,7 +150,7 @@ public class PrintStream extends FilterOutputStream
*/
protected void setError ()
{
- error = true;
+ error_occurred = true;
}
/**