On Tue, 27 Jan 2026 16:31:23 GMT, Alexey Ivanov <[email protected]> wrote:

>> AppContext is removed from Swing LAF state. Tests which require it are 
>> deleted.
>
> src/java.desktop/share/classes/javax/swing/UIManager.java line 247:
> 
>> 245:      */
>> 246:     private static LAFState getLAFState() {
>> 247:         return LAF_STATE;
> 
> I think you still have to use `synchronized (classLock)`, otherwise 
> `LAF_STATE.initialized` in `isLafStateInitialized` could return a stale value.

The existing code only used that when creating the instance, not when 
retrieving an already created instance, so I don't see why we'd need to extend 
the lock to the retrieval.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29437#discussion_r2733242279

Reply via email to