the attached patch fixes a small problem in AttributedString that prevented FOP from working with it on kaffe.
OK to check in?
2004-01-21 Dalibor Topic <[EMAIL PROTECTED]>
* libraries/javalib/java/text/AttributedString.java (addAttribute(AttributedCharacterIterator.Attribute,Object,int,int)):
Use HashMap instead of Hashtable since value can be null, and
we can not store a null value in a Hashtable.
cheers, dalibor topic
--- /var/tmp/PROJECTS/classpath//./java/text/AttributedString.java Tue Jan 22
23:27:01 2002
+++ java/text/AttributedString.java Mon Dec 8 17:03:29 2003
@@ -39,6 +39,7 @@
package java.text;
import java.util.Iterator;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.HashSet;
import java.util.Map;
@@ -329,7 +330,7 @@
* of the string.
*
* @param attrib The attribute to add.
- * @param value The value of the attribute.
+ * @param value The value of the attribute, which may be null.
* @param begin_index The beginning index of the subrange.
* @param end_index The ending index of the subrange.
*
@@ -342,10 +343,10 @@
if (attrib == null)
throw new IllegalArgumentException("null attribute");
- Hashtable ht = new Hashtable();
- ht.put(attrib, value);
+ HashMap hm = new HashMap();
+ hm.put(attrib, value);
- addAttributes(ht, begin_index, end_index);
+ addAttributes(hm, begin_index, end_index);
}
/*************************************************************************/
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

