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]

[PATCH] java.nio - exception rewrite


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

Hi list,


I have rewritten two exceptions in java.nio to match the ones from SUN 
for serialization. Please review and comment.


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

iD8DBQE+Q4rhWSOgCCdjSDsRAhL6AJ0Qk5+YcwdXepnpQT7Q0bcYb4Q9SACdFi9z
IH+wWBI0BzFUPdhyXgKc5v4=
=+cwd
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1663
diff -u -r1.1663 ChangeLog
--- ChangeLog	4 Feb 2003 21:07:15 -0000	1.1663
+++ ChangeLog	7 Feb 2003 10:23:29 -0000
@@ -1,3 +1,16 @@
+2003-02-07  Michael Koch  <konqueror@gmx.de>
+
+	* java/nio/charset/IllegalCharsetNameException.java
+	(serialVersionUID): New member variable.
+	(charsetName): New member variable.
+	(IllegalCharsetException): New implementation.
+	(getCharsetName): New implementation.
+	* java/nio/charset/UnsupportedCharsetException.java
+	(serialVersionUID): New member variable.
+	(charsetName): New member variable.
+	(UnsupportedCharsetException): New implementation.
+	(getCharsetName): New implementation.
+
 2003-02-04  Tom Tromey  <tromey@redhat.com>
 
 	* java/io/PipedOutputStream.java (flush): Declare as throwing
Index: java/nio/charset/IllegalCharsetNameException.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/nio/charset/IllegalCharsetNameException.java,v
retrieving revision 1.2
diff -u -r1.2 IllegalCharsetNameException.java
--- java/nio/charset/IllegalCharsetNameException.java	11 Nov 2002 07:12:07 -0000	1.2
+++ java/nio/charset/IllegalCharsetNameException.java	7 Feb 2003 10:23:29 -0000
@@ -38,16 +38,25 @@
 package java.nio.charset;
 
 /**
+ * @author Michael Koch
  * @since 1.4
  */
 public class IllegalCharsetNameException extends IllegalArgumentException
 {
   /**
+   * Compatible with JDK 1.4+
+   */
+  private static final long serialVersionUID = 1457525358470002989L;
+  
+  String charsetName;
+  
+  /**
    * Creates the exception
    */
   public IllegalCharsetNameException (String charsetName)
   {
-    super (charsetName);
+    super ();
+    this.charsetName = charsetName;
   }
 
   /**
@@ -55,6 +64,6 @@
    */
   public String getCharsetName ()
   {
-    return getMessage ();
+    return charsetName;
   }
 }
Index: java/nio/charset/UnsupportedCharsetException.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/nio/charset/UnsupportedCharsetException.java,v
retrieving revision 1.2
diff -u -r1.2 UnsupportedCharsetException.java
--- java/nio/charset/UnsupportedCharsetException.java	11 Nov 2002 07:12:07 -0000	1.2
+++ java/nio/charset/UnsupportedCharsetException.java	7 Feb 2003 10:23:29 -0000
@@ -38,16 +38,25 @@
 package java.nio.charset;
 
 /**
+ * @author Michael Koch
  * @since 1.4
  */
 public class UnsupportedCharsetException extends IllegalArgumentException
 {
   /**
+   * Compatible with JDK 1.4+
+   */
+  private static final long serialVersionUID = 1490765524727386367L;
+  
+  String charsetName;
+  
+  /**
    * Creates the exception
    */
   public UnsupportedCharsetException (String charsetName)
   {
-    super (charsetName);
+    super ();
+    this.charsetName = charsetName;
   }
 
   /**
@@ -55,6 +64,6 @@
    */
   public String getCharsetName ()
   {
-    return getMessage ();
+    return charsetName;
   }
 }

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