npryce/hamkrest

Use of service loader in describe.kt is not threadsafe

daviddenton opened this issue · 1 comments

When running tests in parallel, we are seeing threading problems with the following line of code:
private val descriptionServices = ServiceLoader.load(ValueDescription::class.java)

https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html says “Instances of this class are not safe for use by multiple concurrent threads.”

Fix committed and published to Maven Central