RFR: 8303478: DatePicker throws uncatchable exception on tab out from garbled text
Marius Hanl
mhanl at openjdk.org
Thu Nov 9 17:52:33 UTC 2023
On Tue, 31 Oct 2023 19:20:48 GMT, brunesto <duke at openjdk.org> wrote:
> The fix prevents the DatePicker from losing focus if the date is not parsable.
modules/javafx.controls/src/main/java/javafx/scene/control/DatePicker.java line 157:
> 155:
> 156: /**
> 157: * This is to address https://bugs.openjdk.org/browse/JDK-8303478
I don't think this javadoc is needed, since it just links the issue one can also lookup when checking the git history
tests/system/src/test/java/test/robot/javafx/scene/DatePickerOnFocusLostTest.java line 98:
> 96: // 3. Click on button to grab the focus and hence attempt to datePicker.commitValue()
> 97: // 4. Verify that in case of typo, the value was reverted, as well as the editor's text
> 98: public void testDatePickerCommit(boolean typo) throws Exception {
you actually can also write a normal JUnit test as far as I get this. Then there is no need for `Util.runAndWait`, `sleep` and so on.
See: `test.javafx.scene.control.DatePickerTest`
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1274#discussion_r1379717425
PR Review Comment: https://git.openjdk.org/jfx/pull/1274#discussion_r1379714171
More information about the openjfx-dev
mailing list