On Sat, 28 Mar 2026 14:27:27 GMT, Marius Hanl <[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.
>
> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java
>  line 167:
> 
>> 165: 
>> 166:     protected int getIndex() {
>> 167:         return getNode() != null ? getNode().getIndex() : -1;
> 
> Can `getNode()` return null?

unsure, but the instanceof check also covered this.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2129#discussion_r3006694344

Reply via email to