On Tue, 20 Jan 2026 09:41:09 GMT, Sergey Bylokhov <[email protected]> wrote:

>> src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line 
>> 434:
>> 
>>> 432:      */
>>> 433:     public void setStyleSheet(StyleSheet s) {
>>> 434:         defaultStyles = s;
>> 
>> Dont we need to add `synchronized` for setter and getter? getAppContext used 
>> to use getAppContextLock!!
>
> Some consideration might be needed. It should be taken into account that 
> using AppContext.get/put/remove indirectly causes synchronization points, so 
> everything written before getAppContext becomes visible after.

It would probably be better to use LazyConstants for all of this instead of 
moving everything into a static block and loading everything eagerly.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29259#discussion_r2709254708

Reply via email to