summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2006-11-28 12:42:52 +0000
committerRoman Kennke <roman@kennke.org>2006-11-28 12:42:52 +0000
commitf653b9742c6d2de88d5eb1ffbe439f51a7a82fae (patch)
tree4a8d9e92964798e0b9ef33f7f7d519459b0cfcf0
parentcc957487d083f32e798a6c804f674fc1ca4cf9c5 (diff)
downloadclasspath-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--ChangeLog6
-rw-r--r--javax/swing/JComponent.java7
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3273adfe3..c2c2dbe39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}
/**