RFR: JDK-8325402: TreeTableRow updateItem() does not check item with isItemChanged(..) unlike all other cell implementations
Marius Hanl
mhanl at openjdk.org
Thu Feb 8 19:00:28 UTC 2024
`TreeTableRow` does not check the item with `isItemChanged(..)`, unlike all other implementations of the cell.
This also means that the `TreeTableRow` always updates the item, although it should not, resulting in a performance loss as a `TreeTableRow` will always call `updateItem(..)`.
It looks like that this was forgotten in [JDK-8092593](https://bugs.openjdk.org/browse/JDK-8092593).
Checking the whole history, it looks like the following was happening:
1. There was a check if the item is the same in all cell implementations (with `.equals(..)`)
2. Check was removed as it caused bugs
3. Check was readded, but instead we first check the index (same index) and then if we also have the same item (this time with `.isItemChanged(..)`, to allow developers to subclass it)
4. Forgotten for `TreeTableRow`.
Added many tests for the case where an item should be changed and where it should not.
-------------
Commit messages:
- JDK-8325402: TreeTableRow updateItem() does not check item with isItemChanged(..) unlike all other cell implementations
Changes: https://git.openjdk.org/jfx/pull/1360/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1360&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325402
Stats: 541 lines in 11 files changed: 512 ins; 2 del; 27 mod
Patch: https://git.openjdk.org/jfx/pull/1360.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1360/head:pull/1360
PR: https://git.openjdk.org/jfx/pull/1360
More information about the openjfx-dev
mailing list