RFR: 8296653: ComboBox promptText is not displayed when the value is reset [v2]

Ziad El Midaoui zelmidaoui at openjdk.org
Fri Nov 28 15:45:06 UTC 2025


On Thu, 27 Nov 2025 17:36:55 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> Ziad El Midaoui has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove space
>>  - Added Test and fixed comment
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ComboBoxListViewSkin.java line 459:
> 
>> 457:             if (cell == buttonCell) {
>> 458:                 final String promptText = comboBox.getPromptText();
>> 459:                 if (comboBox.getValue() == null
> 
> is the `comboBox.getValue()` check needed? Asking, as we are in here only if `empty` is true, so maybe this is not needed to check?

The empty it is for the cell, `comboBox.getValue()` check the value of the control `ComboBox`. I think it's a good check to add to make sure it works when the value of the ComboBox is `null`

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1989#discussion_r2572019650


More information about the openjfx-dev mailing list