RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed

Tejesh R tr at openjdk.org
Thu Aug 29 05:23:20 UTC 2024


On Thu, 29 Aug 2024 05:05:17 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

> > One slight concern is that, does GTKStockIcon has any role to play with synchronized block?
> 
> Sorry, I didn't understand what do you mean.

I meant, since `ICONS_MAP` stores `GTKStockIcon`  as value, I was wondering does that make any difference or need for the map to be synchronized? I also came across Immutable Maps which are inherently thread safe. If ICONS_MAP are immutable one, then Synchronized block is definitely redundant.

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

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


More information about the client-libs-dev mailing list