RFR: JDK-6998249: Wrong behavior/Javadoc of JTable.tableChanged(TableModelEvent e)

Phil Race prr at openjdk.java.net
Fri Jan 28 03:21:10 UTC 2022


On Fri, 28 Jan 2022 02:13:46 GMT, Harshitha Onkar <duke at openjdk.java.net> wrote:

>> src/java.desktop/share/classes/javax/swing/JTable.java line 4423:
>> 
>>> 4421:      * coordinate system of the view for the row; the appropriate
>>> 4422:      * mapping to the view coordinate system is performed by this
>>> 4423:      * <code>JTable</code> when it receives the event.
>> 
>> A few things
>> - since most of the doc is changing we can update to use the more modern {@code ...} instead
>> - the 2nd clause is now only about the columns so should say "the appropriate mapping of the column to"
>> - there's no @param tag .. how come doclint isn't complaining ? But we should fix it.
>> - This will require a CSR.
>> Oh and I assume you can confirm that you verified the above is 100% true .. and there's no need to mention RowSorter - can you point to where the event is created ?
>
> @prrace Should all instances of "code tags" (entire JTable) changed to {@code...} or for the tableChanged method only?
> I was not able to understand the last point clearly. Can you please elaborate?

I said most of the doc is changing which is clearly not most of the doc for JTable so it means just this method.

To the latter point the doc you are proposing is asserting that it does not apply to rows.
Now since we also know this is all supposed to be code called ny the implementation and responded to by the implementation and even so we are NOT going to change anything because some code somewhere would break, nontheless we want to be sure the new code is what actually happens and not just what someone wrote in a  bug report several years ago. So go find the code that calls "new TableModelEvent" and point in this PR to how it guarantees the rows are in view order.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7253



More information about the client-libs-dev mailing list