Closed dbeliakov-r7 closed 3 months ago
Issues
4 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I'm not sure I approve of this: it's not fixing any sort of bug nor is it likely fixing any serious performance issue. All it is doing is potentially introducing new subtle bugs or incompatibilities.
This PR replaces the old Hashtable with modern data structures. Hashtable is no longer maintained and is not optimised for better performance.
I replaced type declaration with the interface. Since Hashtable is-a Map, this is seamless. I replaced Hashtable with ConcurrentHashMap where multiple threads is expected to access the map, but ConcurrentHashMap handles it better (this could be improved further, but one step at a time). I replaced Hashtable with HashMap where synchronisation was unnecessary.