RFR: 8372203: Piecewise linear easing function [v4]

Michael Strauß mstrauss at openjdk.org
Tue Nov 25 16:18:50 UTC 2025


On Tue, 25 Nov 2025 15:23:00 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   rename LINEAR() to ofLinear()
>
> modules/javafx.graphics/src/main/java/javafx/animation/Interpolator.java line 98:
> 
>> 96: 
>> 97:     /**
>> 98:      * Returns a piecewise-linear interpolator with the specified control points.
> 
> Question: do we need to specify that a new instance is returned each time (as opposed to some sort of caching as with `Integer.valueOf`)?

I've changed the wording here to give us more flexibility in terms of how we implement this in the future. While we are returning a new instance each time, we don't need to: all our currently implemented interpolators are stateless and safe to share, even across threads.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1977#discussion_r2560593149


More information about the openjfx-dev mailing list