Re: [OpenJDK 2D-Dev] Thread safety of SunFontManager.platformFontMap

2021-02-22 Thread Philip Race
The map is not expected to be updated after it has been created so it should not need synchronized access. There are a couple of exceptions where it is being updated when some file that is supposed to be there can't be found - a scenario that apparently hasn't been an issue in the 10 years this

[OpenJDK 2D-Dev] Thread safety of SunFontManager.platformFontMap

2021-02-22 Thread Andrey Turbanov
Hello. I recently found suspicious field (with SpotBugs help) in class SunFontManager: static HashMap platformFontMap; This HashMap is accessed (read and write) in a method sun.font.SunFontManager#findFontFromPlatformMap. As I see there is no synchronization when this HashMap is accessed. Thi