RFR: 8089398: [ChoiceBox, ComboBox] throws NPE on setting value on null selectionModel [v2]

Marius Hanl mhanl at openjdk.java.net
Tue Jul 6 20:20:28 UTC 2021


On Mon, 5 Jul 2021 13:06:48 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Marius Hanl has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - removed now unused imports
>>  - Review adjustments
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java line 176:
> 
>> 174:             fail("ChoiceBox.setValue() should not throw an exception.");
>> 175:         }
>> 176: 
> 
> why the try? let the exception bubble up as-thrown (just call the formerly misbehaving method) - otherwise we are loosing information as to the origin of the error :)

That was probably to simple to think of for me ��  
done

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

PR: https://git.openjdk.java.net/jfx/pull/557


More information about the openjfx-dev mailing list