On Wed, 28 Aug 2024 21:37:39 GMT, Alisen Chung <[email protected]> wrote:

> What's the benefit of removing synchronized from the get call? 

As I mentioned earlier, `ICONS_MAP` are initialized only in **static block** 
and after that it is just referenced to access the value out of it. Even though 
`ICONS_MAP` are accessed simultaneously for read operation by multiple threads, 
it won't lead to any  inconsistent state. So, the use of Synchronized look 
unnecessary to me and the removal of Synchronized shouldn't affect the object 
state in multi threaded environment.

> Also were tests run on all platforms that use GTK? 

Basically I ran the regression tests for linux platform which is supposed to 
have GTK environment.

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

PR Comment: https://git.openjdk.org/jdk/pull/20741#issuecomment-2316675427

Reply via email to