Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-05 Thread Alexey Ivanov
On Sat, 2 Nov 2024 09:08:41 GMT, Andrey Turbanov wrote: > > I am not seeing a lot of value in this churn in completely OK code. > > Can't say I see that code as "OK". > Hashtable usage in 2024 brings eye bleeding for most of developers. > Specifying incorrect initial size adds even more _fun_.

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-02 Thread Andrey Turbanov
On Fri, 1 Nov 2024 22:21:31 GMT, Phil Race wrote: >I am not seeing a lot of value in this churn in completely OK code. Can't say I see that code as "OK". Hashtable usage in 2024 brings eye bleeding for most of developers. Specifying incorrect initial size adds even more _fun_. >Instead please f

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap [v2]

2024-11-02 Thread Andrey Turbanov
> If a thread-safe implementation is not needed, it is recommended to use > HashMap instead of legacy synchronized Hashtable. > Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization > block and then only `get` method is called. > > The only subtle difference is that Hasht

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread Phil Race
On Wed, 30 Oct 2024 12:02:14 GMT, Andrey Turbanov wrote: > If a thread-safe implementation is not needed, it is recommended to use > HashMap instead of legacy synchronized Hashtable. > Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization > block and then only `get` meth

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread ExE Boss
On Wed, 30 Oct 2024 12:02:14 GMT, Andrey Turbanov wrote: > If a thread-safe implementation is not needed, it is recommended to use > HashMap instead of legacy synchronized Hashtable. > Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization > block and then only `get` meth

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread Harshitha Onkar
On Wed, 30 Oct 2024 12:02:14 GMT, Andrey Turbanov wrote: > If a thread-safe implementation is not needed, it is recommended to use > HashMap instead of legacy synchronized Hashtable. > Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization > block and then only `get` meth

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread Andrey Turbanov
On Thu, 31 Oct 2024 20:36:28 GMT, Harshitha Onkar wrote: >> If a thread-safe implementation is not needed, it is recommended to use >> HashMap instead of legacy synchronized Hashtable. >> Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization >> block and then only `get`

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread Harshitha Onkar
On Thu, 31 Oct 2024 20:41:40 GMT, Andrey Turbanov wrote: >> @turbanoff Based on your explanation, it sounds reasonable to convert >> CSS.htmlAttrToCssAttrMap from Hashtable to HashMap since synchronization may >> not be required. >> >> There are few more Hashtables - `styleConstantToCssMap, >