On Sat, 27 Jan 2024 17:26:45 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> Added a utility method to run code on the FX thread if it's not already, and 
>> changed the animation methods to use it.
>
> Nir Lisker has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update documentation on AnimationTimer methods

modules/javafx.graphics/src/main/java/javafx/animation/Animation.java line 1008:

> 1006:         if (parent != null) {
> 1007:             throw new IllegalStateException("Cannot start when embedded 
> in another animation");
> 1008:         }

Hm, this is going to look really ugly if the caller wasn't on the FX thread.  
The exception won't be thrown, it seems to work, but once run on the FX thread, 
it will just log this instead of breaking the callers flow.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1352#discussion_r1468541499

Reply via email to