-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
beta
-
x86
-
windows_2000
Name: yyT116575 Date: 09/28/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
This source code snippet is taken directly from javax/swing/JTable.java, in the
public void propertyChange(PropertyChangeEvent) method:
<pre>
// re-set columnModel listeners
// and column's selection property listener as well
1. } else if (name.compareTo("columnModel") == 0) {
2.
3. if (oldValue != null && oldValue instanceof TableColumnModel) {
4. TableColumnModel tcm = (TableColumnModel) oldValue;
5. tcm.removeColumnModelListener(this);
6. tcm.getSelectionModel().removeListSelectionListener(this);
7. }
8. if (newValue != null && newValue instanceof TableColumnModel) {
9. TableColumnModel tcm = (TableColumnModel) oldValue;
10. tcm.addColumnModelListener(this);
11. tcm.getSelectionModel().addListSelectionListener(this);
12. }
</pre>
On line 9, shouldn't it be getting a reference to newValue instead of oldValue,
and registering as a listener for the new TableColumnModel, instead of
reregistering as a listener on the old TableColumnModel?
(Review ID: 110143)
======================================================================