RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed
Abhishek Kumar
abhiscxk at openjdk.org
Thu Aug 29 07:45:19 UTC 2024
On Thu, 29 Aug 2024 05:20:20 GMT, Tejesh R <tr at openjdk.org> wrote:
> 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.
`GTKStockIcon` objects are also created inside static block, So, I guess that should be fine.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20741#issuecomment-2316925469
More information about the client-libs-dev
mailing list