[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: fix for Charset

Kaffe CVS cvs-commits at kaffe.org
Sat Feb 19 09:17:06 PST 2005


PatchSet 5571 
Date: 2005/02/19 17:11:55
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with  GNU Classpath: fix for Charset

2005-02-19  Dalibor Topic  <robilad at kaffe.org>

Resynced with GNU Classpath.

2005-02-18  Robert Schuster <thebohemian at gmx.net>

* java/nio/charset/Charset.java (forName): Throws
IllegalArgumentException when argument is null
and added documentation.

Members: 
	ChangeLog:1.3615->1.3616 
	libraries/javalib/java/nio/charset/Charset.java:1.8->1.9 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3615 kaffe/ChangeLog:1.3616
--- kaffe/ChangeLog:1.3615	Sat Feb 19 16:55:26 2005
+++ kaffe/ChangeLog	Sat Feb 19 17:11:55 2005
@@ -2,6 +2,16 @@
 
 	Resynced with GNU Classpath.
 	
+	2005-02-18  Robert Schuster <thebohemian at gmx.net>
+
+	* java/nio/charset/Charset.java (forName): Throws
+	IllegalArgumentException when argument is null
+	and added documentation.
+	
+2005-02-19  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+	
 	2005-02-17  Mark Wielaard  <mark at klomp.org>
 
 	* java/util/SimpleTimeZone.java (checkRule): Throw
Index: kaffe/libraries/javalib/java/nio/charset/Charset.java
diff -u kaffe/libraries/javalib/java/nio/charset/Charset.java:1.8 kaffe/libraries/javalib/java/nio/charset/Charset.java:1.9
--- kaffe/libraries/javalib/java/nio/charset/Charset.java:1.8	Sat Jan  8 22:02:39 2005
+++ kaffe/libraries/javalib/java/nio/charset/Charset.java	Sat Feb 19 17:11:59 2005
@@ -127,9 +127,24 @@
   {
     return charsetForName (charsetName) != null;
   }
- 
+
+  /**
+   * Returns the Charset instance for the charset of the given name.
+   * 
+   * @param charsetName
+   * @return
+   * @throws UnsupportedCharsetException if this VM does not support
+   * the charset of the given name.
+   * @throws IllegalCharsetNameException if the given charset name is
+   * legal.
+   * @throws IllegalArgumentException if <code>charsetName</code> is null.
+   */
   public static Charset forName (String charsetName)
   {
+    // Throws IllegalArgumentException as the JDK does.
+    if(charsetName == null)
+        throw new IllegalArgumentException("Charset name must not be null.");
+    
     Charset cs = charsetForName (charsetName);
     if (cs == null)
       throw new UnsupportedCharsetException (charsetName);




More information about the kaffe mailing list