Race condition resulting in NPEs when querying the EClass for a class using EcoreUtils
When concurrently accessing the
org.fortiss.tooling.kernel.utils.EcoreUtils.getEClassForClass
method
the registry.getEPackage
lookup fails, resulting in a NPE.
Alexander Diewald suggested synchronizing the method rather than the code calling it as this issue could potentially cause problems elsewhere.
Steps to reproduce (likely)
- Create a large component architecture (e.g. the one from the file included)
- Start as many concurrent threads as possible, each transforming the component architecture in a task architecture
(from redmine: issue id 3670, created on 2019-03-08, closed on 2019-03-11)
- Uploads: