On Mon, 19 Jan 2026 07:06:53 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> This PR removes usage of AppContext from classes under javax/swing/text.
>> Most of the uses were added in specific bug fixes 10-15 years ago but are 
>> now obsolete and the tests for those bugs need to be deleted too.
>
> 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.

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

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

Reply via email to