[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: JComponent fixlet
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: JComponent fixlet |
Date: |
Thu, 21 Jul 2005 16:33:26 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050317) |
I fixed the putClientProperty method, so that if a null value is
specified, the corresponding key is removed from the Hashtable.
Otherwise we would get a NPE here.
2005-07-21 Roman Kennke <address@hidden>
* javax/swing/JComponent.java
(putClientProperty): If value == null, remove the key from the
Hashtable, otherwise we would get an NPE here.
/Roman
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.53
diff -u -r1.53 JComponent.java
--- javax/swing/JComponent.java 21 Jul 2005 08:26:09 -0000 1.53
+++ javax/swing/JComponent.java 21 Jul 2005 14:31:43 -0000
@@ -451,7 +451,10 @@
*/
public final void putClientProperty(Object key, Object value)
{
- getClientProperties().put(key, value);
+ if (value != null)
+ getClientProperties().put(key, value);
+ else
+ getClientProperties().remove(key);
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: JComponent fixlet,
Roman Kennke <=