On Sat, 10 Oct 2026 12:16:54 GMT, Marius Hanl <[email protected]> wrote:

>> 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.

> This pattern was [deliberately 
> introduced](https://github.com/openjdk/jfx/pull/1608#discussion_r1819938688) 
> so that static constants can be initialized from an expression.

Right, I remember now. This keeps the changes localized without introducing a 
bunch of static helper methods.

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

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

Reply via email to