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

Michael Strauß mstrauss at openjdk.org
Thu Jan 15 20:07:46 UTC 2026


On Thu, 15 Jan 2026 19:40:45 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   private equalsEndValue() implementation
>
> modules/javafx.graphics/src/main/java/javafx/css/StyleableBooleanProperty.java line 57:
> 
>> 55:         StyleablePropertyHelper.setBooleanAccessor(new StyleablePropertyHelper.Accessor() {
>> 56:             @Override
>> 57:             public boolean equalsAfterChangeStyleValue(StyleableProperty<?> property, Object value) {
> 
> minor: would it be slightly more organized to call a private instance method of the property class from each accessor?
> 
> I think the code is ok, it's just adds so much nearly identical code that bothers me, though I can't figure out a way to avoid the `Accessor` pattern here, package protected methods would not work, would they?

I've factored out the implementation into a private `equalsEndValue(Object)` method on each property class. The accessor pattern is unfortunate here, but the only alternative would be to add the method as public API to the `StyleableProperty` interface, and that's probably not something that we should do just to fix a bug.

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

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


More information about the openjfx-dev mailing list