[Patch][GUI] UIDefaults.put
Michael Koch
konqueror@gmx.de
Tue Jan 11 13:26:00 GMT 2005
Hi list,
I commited the attached patch to fix javax.swing.UIDefaults.put() as it
unlike its super class needs to handle values of null.
Michael
2005-01-11 Michael Koch <konqueror@gmx.de>
* javax/swing/UIDefaults.java (put): Handle value of null.
-------------- next part --------------
Index: javax/swing/UIDefaults.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/UIDefaults.java,v
retrieving revision 1.7.2.8
diff -u -r1.7.2.8 UIDefaults.java
--- javax/swing/UIDefaults.java 24 Dec 2004 09:52:57 -0000 1.7.2.8
+++ javax/swing/UIDefaults.java 11 Jan 2005 13:23:27 -0000
@@ -286,7 +286,11 @@
public Object put(Object key, Object value)
{
- Object old = super.put(key, value);
+ Object old;
+ if (value != null)
+ old = super.put(key, value);
+ else
+ old = super.remove(key);
if (key instanceof String && old != value)
firePropertyChange((String) key, old, value);
return old;
More information about the Java-patches
mailing list