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]> my testing on macOS testing looks good - it appears only `TreeTableView` exhibit this issue. I think this fix must be tested on windows due to differences in the popup trigger. @lukostyra could you be the second reviewer please? modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java line 213: > 211: > 212: int count = getItemCount(); > 213: if (cell.getIndex() >= count) { is it possible to get a negative index at this point? should we check for `index < 0` as well? modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TableRowBehaviorBase.java line 86: > 84: > 85: int count = getItemCount(); > 86: if (getNode().getIndex() >= count) { same question about negative index ------------- PR Review: https://git.openjdk.org/jfx/pull/2129#pullrequestreview-5115621636 PR Review Comment: https://git.openjdk.org/jfx/pull/2129#discussion_r3936054628 PR Review Comment: https://git.openjdk.org/jfx/pull/2129#discussion_r3936064190
