RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

Kevin Rushforth kcr at openjdk.org
Wed Feb 12 23:29:16 UTC 2025


On Wed, 12 Feb 2025 19:45:32 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> ## Root Cause
> 
> Focus is being requested in show(), even a background thread.
> 
> ## Solution
> 
> Do not request focus if in a background thread.

Even after considering option 3, I prefer option 1. I can't think of a good reason to allow a show method that will fail in some case (because it is documented that an app can't show a window on a background thread). A clear exception seems better than silently making it a no-op. @mstr2 said something similar in #1709

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

PR Comment: https://git.openjdk.org/jfx/pull/1708#issuecomment-2655065374


More information about the openjfx-dev mailing list