Sorry, I forgot the actual patch.
2005-04-17 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/text/SimpleAttributeSet.java
(addAttribute): Check for null and remove key in that case.
This fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21064 .
/Roman
Am Sonntag, den 17.04.2005, 20:55 +0200 schrieb Roman Kennke:
> Hi,
>
> this fixes the following bug:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21064
>
> it basically checks if the value is null and in that case removes the
> key from the Hashtable.
>
> /Roman
>
>
>
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/text/SimpleAttributeSet.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/SimpleAttributeSet.java,v
retrieving revision 1.5
diff -u -r1.5 SimpleAttributeSet.java
--- javax/swing/text/SimpleAttributeSet.java 11 Nov 2004 22:36:46 -0000 1.5
+++ javax/swing/text/SimpleAttributeSet.java 17 Apr 2005 18:52:11 -0000
@@ -63,7 +63,10 @@
public void addAttribute(Object name, Object value)
{
- tab.put(name, value);
+ if (value == null)
+ tab.remove(name);
+ else
+ tab.put(name, value);
}
public void addAttributes(AttributeSet attributes)
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches