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

Jeanette Winzenburg fastegal at openjdk.java.net
Fri Jul 9 10:06:55 UTC 2021


On Thu, 8 Jul 2021 21:04:44 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

> 
> 
> Hmm, but leaving a test without an assert is also bad. You have any suggestions?

Not aware of such a rule - if we fix code throwing an exception there is not much to assert, except that it fails before and passes after. And paddling back a bit, I think a separate test for the back switch would be overdoing it :) 

         @Test 
         ...
         // configure: just as you do
         comboBox.setEditable(true)
         ...
         // the test: just as you do - switch to false
         comboBox.setEditable(false)
         // safe-guard against future implementation changes: switch back to true
         comboBox.setEditable(true)
         // end of test

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

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


More information about the openjfx-dev mailing list