eclipse warnings
Andy Goryachev
andy.goryachev at oracle.com
Mon Dec 4 17:59:44 UTC 2023
Yep, that's exactly my point.
One may argue that using a local variable might help. I don't think there is a warning for this kind of code pattern though.
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Michael Strauß <michaelstrau2 at gmail.com>
Date: Monday, December 4, 2023 at 09:55
To:
Cc: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: Re: eclipse warnings
Side effects are not limited to race conditions. A getter might return
a different value every time, or it might execute code other than
simply returning a value, or a lazy evaluation scheme might cause
other code to be executed. The point is, we don't know that at the
call site, we'd need to inspect what the getter actually does.
On Mon, Dec 4, 2023 at 6:47 PM Andy Goryachev <andy.goryachev at oracle.com> wrote:
>
> This might be different.
>
>
>
> If we can guarantee that the access to the underlying variable(s) is single threaded - then no. But we had at least one bug recently in JFXPanel where two threads were involved. Those cases need to use a very different access pattern(s), depending on the exact circumstances.
>
>
>
> -andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20231204/06ae84f9/attachment-0001.htm>
More information about the openjfx-dev
mailing list