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

Marius Hanl mhanl at openjdk.java.net
Sat Jul 3 12:58:16 UTC 2021


On Thu, 1 Jul 2021 15:09:43 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java line 162:
>> 
>>> 160:         ByteArrayOutputStream out = new ByteArrayOutputStream();
>>> 161:         System.setErr(new PrintStream(out, true));
>>> 162: 
>> 
>> hmm .. this looks a bit unusual. I suspect you want to somehow get around not receiving errors when property changes are involved - if so, the way we typically handle it is to install an uncaughtExceptionHandler to make them appear in the tests (see f.i. ListCellTest). Might have a reason I don't see, though - if so, which?
>
> Ahh, now I understand this. I saw that in one test class but was not sure what it does. I will have a look later on this.

Done. Works like a charm, thanks for the tip. ��

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

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


More information about the openjfx-dev mailing list