RFR: 8376433: Remove AppContext from Swing Windows L&F implementation
Phil Race
prr at openjdk.org
Tue Jan 27 06:20:02 UTC 2026
On Tue, 27 Jan 2026 06:08:30 GMT, Sergey Bylokhov <serb at openjdk.org> 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
More information about the client-libs-dev
mailing list