On Thu, 8 Oct 2026 16:27:39 GMT, Michael Strauß <[email protected]> wrote:

>> The usual argument for unrelated changes is to make them in a separate PR 
>> for the sake or reviewers and backporters, but if we are touching this code 
>> we might as well clean it up.
>
> This pattern was [deliberately 
> introduced](https://github.com/openjdk/jfx/pull/1608#discussion_r1819938688) 
> so that static constants can be initialized from an expression. The 
> alternative, stuffing unrelated initialization code into a static 
> initializer, or having a static initialization method, has its downsides.

Makes sense! Also not a fan of a static initializer. 

I think what Andy meant though (thats at least how I understood it), is that 
maybe some of those variables can be initialized directly by a one-liner, as 
the code got a bit shorter. But this is also not possible in a good way.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2299#discussion_r4237577169

Reply via email to