eclipse warnings
Michael Strauß
michaelstrau2 at gmail.com
Tue Dec 5 20:42:43 UTC 2023
Unfortunately, this doesn't work. The Java language doesn't allow a
pattern to be the same type as the expression.
On Tue, Dec 5, 2023 at 1:27 PM John Hendrikx <john.hendrikx at gmail.com> wrote:
>
> When this runs on the FX thread it has to be safe, but it's not very nice.
>
> These days you can do these kind of null chain checks like this:
>
> if (getScene() instanceof Scene s && s.getWindow() instanceof
> Window w && w.isShowing()) {
>
> }
>
> --John
More information about the openjfx-dev
mailing list