diff options
author | Roman Kennke <roman@kennke.org> | 2006-11-28 12:42:52 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2006-11-28 12:42:52 +0000 |
commit | f653b9742c6d2de88d5eb1ffbe439f51a7a82fae (patch) | |
tree | 4a8d9e92964798e0b9ef33f7f7d519459b0cfcf0 | |
parent | cc957487d083f32e798a6c804f674fc1ca4cf9c5 (diff) | |
download | classpath-f653b9742c6d2de88d5eb1ffbe439f51a7a82fae.tar.gz |
2006-11-28 Roman Kennke <kennke@aicas.com>
* javax/swing/JComponent.java
(putClientProperty): Do not fire event when both old and new
value are == null.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | javax/swing/JComponent.java | 7 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2006-11-28 Roman Kennke <kennke@aicas.com> + + * javax/swing/JComponent.java + (putClientProperty): Do not fire event when both old and new + value are == null. + 2006-11-27 Casey Marshall <csm@gnu.org> * java/util/jar/JarEntry.java (certs): removed. diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java index 026d173ad..cc317492c 100644 --- a/javax/swing/JComponent.java +++ b/javax/swing/JComponent.java @@ -847,7 +847,12 @@ public abstract class JComponent extends Container implements Serializable t.put(key, value); else t.remove(key); - firePropertyChange(key.toString(), old, value); + + // When both old and new value are null, no event is fired. This is + // different from what firePropertyChange() normally does, so we add this + // check here. + if (old != null || value != null) + firePropertyChange(key.toString(), old, value); } /** |