This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.io


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to merged java.io even more with 
classpath.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+yhfFWSOgCCdjSDsRAo2sAJ42rqlY9KG4M6KFp5nawCmJ2nBq/wCbB14a
J9jFLpZf0afYlLwQ7nm34z4=
=Fg0/
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1902
diff -u -b -B -r1.1902 ChangeLog
--- ChangeLog	20 May 2003 09:13:17 -0000	1.1902
+++ ChangeLog	20 May 2003 11:52:04 -0000
@@ -1,5 +1,15 @@
 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.
+
+2003-05-20  Michael Koch  <konqueror@gmx.de>
+
 	* java/io/DataInputStream.java:
 	Reformatted, Replaced < and & with html entitites in documentation.
 	* java/io/File.java:
Index: java/io/DataInputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/DataInputStream.java,v
retrieving revision 1.17
diff -u -b -B -r1.17 DataInputStream.java
--- java/io/DataInputStream.java	20 May 2003 09:13:19 -0000	1.17
+++ java/io/DataInputStream.java	20 May 2003 11:52:04 -0000
@@ -755,6 +755,10 @@
 	    ((long)(buf [7] & 0xff)));  
   }
 
+  // FIXME: This method should be re-thought.  I suspect we have multiple
+  // UTF-8 decoders floating around.  We should use the standard charset
+  // converters, maybe and adding a direct call into one of the new
+  // NIO converters for a super-fast UTF8 decode.
   static String convertFromUTF (byte[] buf) 
     throws EOFException, UTFDataFormatException
   {
Index: java/io/PrintStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/PrintStream.java,v
retrieving revision 1.15
diff -u -b -B -r1.15 PrintStream.java
--- java/io/PrintStream.java	31 Mar 2003 10:15:48 -0000	1.15
+++ java/io/PrintStream.java	20 May 2003 11:52:04 -0000
@@ -81,9 +81,12 @@
   // 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 @@
     super(out);
 
     converter = UnicodeToBytes.getDefaultEncoder();
-    error = false;
     this.auto_flush = auto_flush;
   }
 
@@ -139,7 +141,7 @@
   public boolean checkError ()
   {
     flush();
-    return error;
+    return error_occurred;
   }
 
   /**
@@ -148,7 +150,7 @@
    */
   protected void setError ()
   {
-    error = true;
+    error_occurred = true;
   }
 
   /**

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]