On Tue, 27 Jan 2026 06:08:30 GMT, Sergey Bylokhov <[email protected]> wrote:

>> Remove AppContext from the Windows L&F implementation
>
> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/AnimationController.java
>  line 312:
> 
>> 310:         timer.stop();
>> 311:         UIManager.removePropertyChangeListener(this);
>> 312:         synchronized (AnimationController.class) {
> 
> Just a note that this synchronization is still needed here (even for the 
> updated version) because getAnimationController checks and returns the shared 
> field instead of a local variable. What about possibility to simplify 
> it(return local var there and volatile on field itself)?

possible. But this change is simpler to understand and not likely to matter 
performance-wise.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29440#discussion_r2730430931

Reply via email to