clj-commons/seesaw

The implementation of proxy TableModel addRow has bugs, and full-values atom will be inserted twice

ntestoc3 opened this issue · 0 comments

swing's addRow implementation:
https://github.com/frohoff/jdk8u-jdk/blob/master/src/share/classes/javax/swing/table/DefaultTableModel.java#L349

seesaw's current add-row implementation:
https://github.com/daveray/seesaw/blob/master/src/seesaw/table.clj#L55

DefaultTableModel addRow will call insertRow internally, and if proxy-super addRow used again, full-values will be inserted 2 times.

fix method:

(addRow [^objects values]
        (.insertRow this (.getRowCount this) values))