RFR: 8373038: Interpolator factories should follow method naming convention [v2]
Ambarish Rapte
arapte at openjdk.org
Tue Dec 23 12:34:25 UTC 2025
On Thu, 4 Dec 2025 21:57:32 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> The following interpolator factories don't follow the standard method naming convention:
>>
>> * `Interpolator.SPLINE(double, double, double, double)`
>> * `Interpolator.TANGENT(Duration, double, Duration, double)`
>> * `Interpolator.TANGENT(Duration, double)`
>> * `Interpolator.STEPS(int, StepPosition)`
>>
>> New methods named `ofSpline`, `ofTangent`, and `ofSteps` are added. The existing methods are deprecated (not for removal) in favor of the correctly-named methods. This change is in line with the new `ofLinear` method added with #1977.
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - doc changes
> - Merge branch 'master' into fixes/interpolator-names
> - Interpolator factories should follow method naming convention
LGTM, with one minor query..
modules/javafx.graphics/src/main/java/javafx/animation/Interpolator.java line 383:
> 381:
> 382: /**
> 383: * Built-in interpolator instance that is equivalent to {@code STEPS(1, StepPosition.END)}.
May be remove the reference to STEPS on this line and on line 376 ?
-------------
PR Review: https://git.openjdk.org/jfx/pull/1996#pullrequestreview-3607866241
PR Review Comment: https://git.openjdk.org/jfx/pull/1996#discussion_r2643045478
More information about the openjfx-dev
mailing list