unitsofmeasurement / indriya

JSR 385 - Reference Implementation
Other
119 stars 42 forks source link

Make static caching hash maps multithreading safe #372

Closed stefanuhrig closed 2 years ago

stefanuhrig commented 2 years ago

Two static hash maps that are use for caching values were not multithreading safe.

We change their type from HashMap to ConcurrentHashMap to avoid synchronization issues.

Fixes #371


This change is Reviewable

andi-huber commented 2 years ago

Thanks for reporting these two issues! I'll provide fixes separately - closing your PR without merging. (Very helpful nevertheless.)