summaryrefslogtreecommitdiff
path: root/javax/swing/JComponent.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/JComponent.java')
-rw-r--r--javax/swing/JComponent.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java
index 3b8f1f68c..5ec507922 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);
}
/**