RFR: 8375363: StyleHelper.resetToInitialValues() interrupts animated properties [v4]

Andy Goryachev angorya at openjdk.org
Tue Jan 20 17:33:07 UTC 2026


On Tue, 20 Jan 2026 16:45:17 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/CssStyleHelper.java line 550:
>> 
>>> 548:         }
>>> 549: 
>>> 550:         for (int i = 0, max = subProperties.size(); i < max; ++i) {
>> 
>> very, very minor: since the order probably does not matter:
>> 
>> 
>> for (int i = subProperties.size() - 1, i >= 0; --i) {
>
> The order doesn't matter, but with reverse iteration, I always stop to think whether that tells me something important.
> 
> Someone recently said: why do you force me to think? 😉

Touché :-)

I usually use the reverse order to save 8 bytes (`int max`), but I actually _don't know_ whether it saves - one has to look at the bytecode or better yet, at the produced assembly to see if there is such a saving.

but in any case, since it's not a heap allocation, there is probably very little difference anyway.

I'll show myself out.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2038#discussion_r2709361511


More information about the openjfx-dev mailing list