On Sat, 29 Aug 2026 12:20:13 GMT, Philemon Hilscher <[email protected]> wrote:
>> This fixes the issue adressed here >> https://bugs.openjdk.org/browse/JDK-8222454 >> >> The added TreeTableViewTests were failing without the main code changes. I >> added the other tests to ensure the consistent functionality of related cell >> based components. >> The method getItemCount() needed to be moved to CellBehaviorBase to do the >> necessary index check in doSelect() below. All subclasses now implement this >> method based on the cell container. >> >> There is still some refactoring potential here, to reduce code duplications >> and ensure consistent behavior of all cell based components. This could be >> done in a follow-up PR. >> >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Philemon Hilscher has updated the pull request incrementally with one > additional commit since the last revision: > > 8222454: Review fixes > > Signed-off-by: Philemon Hilscher <[email protected]> some regression found, see inline. modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java line 219: > 217: // If the mouse event is not contained within this TreeCell, then > 218: // we don't want to react to it. > 219: if (!cell.contains(x, y)) { we need to keep `cell.isEmpty()` check here because the model size can change before an existing empty cell is updated (similarly to the cell filter reproducer I've provided earlier) modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TableRowBehaviorBase.java line 85: > 83: if (table == null) return; > 84: > 85: int count = getItemCount(); similarly to the `CellBehaviorBase` case, we'll need to check for `row.isEmpty()` before invoking `getItemCount()`. ------------- Changes requested by angorya (Reviewer). PR Review: https://git.openjdk.org/jfx/pull/2129#pullrequestreview-5214577021 PR Review Comment: https://git.openjdk.org/jfx/pull/2129#discussion_r4019237255 PR Review Comment: https://git.openjdk.org/jfx/pull/2129#discussion_r4019270269
